Skip to content

Commit 9b2387e

Browse files
authored
add event payload
1 parent 0fafc5c commit 9b2387e

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/dispatcher.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,29 @@ jobs:
1313
matrix:
1414
repo: ['wlaunchELF', 'Open-PS2-Loader', 'isjpcm', 'Fceumm-PS2']
1515
runs-on: ubuntu-latest
16-
16+
1717
steps:
1818
- uses: actions/checkout@v2
19-
19+
2020
- name: Send Compile action
2121
run: |
2222
export DISPATCH_ACTION="$(echo run_build)"
2323
echo "NEW_DISPATCH_ACTION=$DISPATCH_ACTION" >> $GITHUB_ENV
24-
24+
2525
- name: Dispatch to organization repositories
26+
if: ${{ github.event_name }} != 'repository_dispatch'
2627
uses: peter-evans/repository-dispatch@v1
2728
with:
2829
repository: ${{ github.repository_owner }}/${{ matrix.repo }}
2930
token: ${{ secrets.DISPATCH_TOKEN }}
3031
event-type: ${{ env.NEW_DISPATCH_ACTION }}
3132
client-payload: '{"ref": "${{ github.ref }}"}'
33+
34+
- name: "Dispatch to organization repositories (with payload)"
35+
if: ${{ github.event_name }} == 'repository_dispatch'
36+
uses: peter-evans/repository-dispatch@v1
37+
with:
38+
repository: ${{ github.repository_owner }}/${{ matrix.repo }}
39+
token: ${{ secrets.DISPATCH_TOKEN }}
40+
event-type: ${{ env.NEW_DISPATCH_ACTION }}
41+
client-payload: '{"ref": "${{ github.ref }}", "parent:" "${{ github.event.client_payload.parent }}", "parent_sha": "${{ github.event.client_payload.parent_sha }}"}'

0 commit comments

Comments
 (0)