diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 1b772daf4..eb5fc8b82 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -65,6 +65,7 @@ on: registry_package: release: repository_dispatch: + types: [debug] # schedule: status: watch: diff --git a/.github/workflows/dispatch-test.yml b/.github/workflows/dispatch-test.yml new file mode 100644 index 000000000..2a42c7371 --- /dev/null +++ b/.github/workflows/dispatch-test.yml @@ -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"