From 9b2387e30caedb4b5802c35421ee0a504b864ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Israelson?= <57065102+israpps@users.noreply.github.com> Date: Tue, 28 Jun 2022 11:30:25 -0300 Subject: [PATCH] add event payload --- .github/workflows/dispatcher.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dispatcher.yml b/.github/workflows/dispatcher.yml index 1200bf6..bce840d 100644 --- a/.github/workflows/dispatcher.yml +++ b/.github/workflows/dispatcher.yml @@ -13,19 +13,29 @@ jobs: matrix: repo: ['wlaunchELF', 'Open-PS2-Loader', 'isjpcm', 'Fceumm-PS2'] runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v2 - + - name: Send Compile action run: | export DISPATCH_ACTION="$(echo run_build)" echo "NEW_DISPATCH_ACTION=$DISPATCH_ACTION" >> $GITHUB_ENV - + - name: Dispatch to organization repositories + if: ${{ github.event_name }} != 'repository_dispatch' uses: peter-evans/repository-dispatch@v1 with: repository: ${{ github.repository_owner }}/${{ matrix.repo }} token: ${{ secrets.DISPATCH_TOKEN }} event-type: ${{ env.NEW_DISPATCH_ACTION }} client-payload: '{"ref": "${{ github.ref }}"}' + + - name: "Dispatch to organization repositories (with payload)" + if: ${{ github.event_name }} == 'repository_dispatch' + uses: peter-evans/repository-dispatch@v1 + with: + repository: ${{ github.repository_owner }}/${{ matrix.repo }} + token: ${{ secrets.DISPATCH_TOKEN }} + event-type: ${{ env.NEW_DISPATCH_ACTION }} + client-payload: '{"ref": "${{ github.ref }}", "parent:" "${{ github.event.client_payload.parent }}", "parent_sha": "${{ github.event.client_payload.parent_sha }}"}'