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 513200f
Show file tree
Hide file tree
Showing 2 changed files with 33 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
32 changes: 32 additions & 0 deletions .github/workflows/dispatch-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
workflow_dispatch:
inputs:
repoCache:
description: "Reset or disable the cache?"
type: choice
default: enabled
options:
- enabled
- disabled
- reset

permissions: {}

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

0 comments on commit 513200f

Please sign in to comment.