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 1/7] 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 }}"}' From 3b4c5a22f8de1e3d06c8edf306ab80703aac5935 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:33:14 -0300 Subject: [PATCH 2/7] Update dispatcher.yml --- .github/workflows/dispatcher.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dispatcher.yml b/.github/workflows/dispatcher.yml index bce840d..8fb723b 100644 --- a/.github/workflows/dispatcher.yml +++ b/.github/workflows/dispatcher.yml @@ -21,7 +21,6 @@ jobs: 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 From a743d644420b5508219d2eee04e55f022d9e9d7d Mon Sep 17 00:00:00 2001 From: El_isra Date: Tue, 28 Jun 2022 11:40:17 -0300 Subject: [PATCH 3/7] Revert "add event payload" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9b2387e30caedb4b5802c35421ee0a504b864ee7. sorry, it was an accident, it won´t happen again --- .github/workflows/dispatcher.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/dispatcher.yml b/.github/workflows/dispatcher.yml index bce840d..1200bf6 100644 --- a/.github/workflows/dispatcher.yml +++ b/.github/workflows/dispatcher.yml @@ -13,29 +13,19 @@ 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 }}"}' From 28dc31d24cbc298e1187a08ddd399bc516e6dfaf 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 12:40:58 -0300 Subject: [PATCH 4/7] Update dispatcher.yml --- .github/workflows/dispatcher.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dispatcher.yml b/.github/workflows/dispatcher.yml index 509db36..293a721 100644 --- a/.github/workflows/dispatcher.yml +++ b/.github/workflows/dispatcher.yml @@ -22,10 +22,25 @@ jobs: export DISPATCH_ACTION="$(echo run_build)" echo "NEW_DISPATCH_ACTION=$DISPATCH_ACTION" >> $GITHUB_ENV + - name: "create payload with parent payload" + if: ${{ github.event_name }} == 'repository_dispatch' + run: | + export REPO_PAYLOAD="$(echo {\"ref\": \"${{ github.ref }}\", \"parent\": \"${{ github.repository }}\", \"parent_sha\": \"${{ steps.slug.outputs.sha8 }}\"})" + echo "NEW_REPO_PAYLOAD=$REPO_PAYLOAD" >> $GITHUB_ENV + + - name: "create payload with parent payload" + if: ${{ github.event_name }} != 'repository_dispatch' + run: | + export REPO_PAYLOAD="$(echo {\"ref\": \"${{ github.ref }}\"})" + echo "NEW_REPO_PAYLOAD=$REPO_PAYLOAD" >> $GITHUB_ENV + + - name: test + run: echo new payload is ${{ env.NEW_REPO_PAYLOAD }} + - name: Dispatch to organization repositories 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 }}"}' + client-payload: '${{ env.NEW_REPO_PAYLOAD }}' From 910846f0e3bf0b6ec6da6bd31acebdf522380f69 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 12:43:11 -0300 Subject: [PATCH 5/7] Update dispatcher.yml --- .github/workflows/dispatcher.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dispatcher.yml b/.github/workflows/dispatcher.yml index 293a721..95f693c 100644 --- a/.github/workflows/dispatcher.yml +++ b/.github/workflows/dispatcher.yml @@ -28,7 +28,7 @@ jobs: export REPO_PAYLOAD="$(echo {\"ref\": \"${{ github.ref }}\", \"parent\": \"${{ github.repository }}\", \"parent_sha\": \"${{ steps.slug.outputs.sha8 }}\"})" echo "NEW_REPO_PAYLOAD=$REPO_PAYLOAD" >> $GITHUB_ENV - - name: "create payload with parent payload" + - name: "create payload with current repository payload" if: ${{ github.event_name }} != 'repository_dispatch' run: | export REPO_PAYLOAD="$(echo {\"ref\": \"${{ github.ref }}\"})" From bb591ba1ba924bef6e3d38e72e4488c5b168a0d2 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 12:47:00 -0300 Subject: [PATCH 6/7] Add manual trigger --- .github/workflows/dispatcher.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dispatcher.yml b/.github/workflows/dispatcher.yml index 95f693c..93f1184 100644 --- a/.github/workflows/dispatcher.yml +++ b/.github/workflows/dispatcher.yml @@ -4,6 +4,7 @@ on: push: branches: - master + workflow_dispatch: repository_dispatch: types: [run_build] From 5312e92122162325932653aa4e73592faf206f11 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 13:15:02 -0300 Subject: [PATCH 7/7] Update dispatcher.yml --- .github/workflows/dispatcher.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dispatcher.yml b/.github/workflows/dispatcher.yml index 93f1184..bb37d02 100644 --- a/.github/workflows/dispatcher.yml +++ b/.github/workflows/dispatcher.yml @@ -32,7 +32,7 @@ jobs: - name: "create payload with current repository payload" if: ${{ github.event_name }} != 'repository_dispatch' run: | - export REPO_PAYLOAD="$(echo {\"ref\": \"${{ github.ref }}\"})" + export REPO_PAYLOAD="$(echo {\"ref\": \"${{ github.ref }}\", \"parent:\" \"${{ github.event.client_payload.parent }}\", \"parent_sha\": \"${{ github.event.client_payload.parent_sha }}\"})" echo "NEW_REPO_PAYLOAD=$REPO_PAYLOAD" >> $GITHUB_ENV - name: test