From f306785eb210a00a3c477b0e6cd80e321c852fb3 Mon Sep 17 00:00:00 2001 From: Elliot DeNolf Date: Mon, 13 Jan 2025 21:01:32 -0500 Subject: [PATCH] ci: dispatch event --- .github/workflows/dispatch-event.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/dispatch-event.yml diff --git a/.github/workflows/dispatch-event.yml b/.github/workflows/dispatch-event.yml new file mode 100644 index 000000000..4509b2408 --- /dev/null +++ b/.github/workflows/dispatch-event.yml @@ -0,0 +1,22 @@ +name: dispatch-event + +on: + workflow_dispatch: + +env: + PAYLOAD_PUSH_MAIN_EVENT: payload-push-main-event + +jobs: + repository-dispatch: + name: Repository dispatch + runs-on: ubuntu-latest + steps: + - name: Dispatch event + if: ${{ github.event_name == 'workflow_dispatch' }} + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.PAYLOAD_REPOSITORY_DISPATCH }} + repository: ${{ secrets.REMOTE_REPOSITORY }} + event-type: ${{ env.PAYLOAD_PUSH_MAIN_EVENT }} + client-payload: '{"event": {"head_commit": {"id": "${{ env.GITHUB_SHA }}"}}}' # mocked for testing + # client-payload: '{"event": ${{ toJson(github.event) }}}'