Skip to content

Commit

Permalink
ci: repository dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogyuchi committed Jun 15, 2024
1 parent 2b31dd2 commit 8fbb9e8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ on:
registry_package:
release:
repository_dispatch:
types: [debug]
# schedule:
status:
watch:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/dispatch-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
workflow_dispatch:
inputs:
repoCache:
description: "Reset or disable the cache?"
type: choice
default: enabled
options:
- enabled
- disabled
- reset

permissions: {}

env:
REPO: '4m-mazi/gh-test'

jobs:
dispatch:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: 'Create a repository dispatch event'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ env.REPO }}/dispatches \
-f "event_type=debug" -F "client_payload[repoCache]=${{ inputs.repoCache }}"

0 comments on commit 8fbb9e8

Please sign in to comment.