|
8 | 8 | jobs: |
9 | 9 | notify-app: |
10 | 10 | runs-on: ubuntu-latest |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + event_type: |
| 14 | + - iOS-ReactNativeClassic |
| 15 | + - Android-ReactNativeClassic |
| 16 | + - iOS-ReactNativeExpo |
| 17 | + - Android-ReactNativeExpo |
11 | 18 | steps: |
12 | | - - name: Dispatch App Build |
| 19 | + - name: Dispatch ${{ matrix.event_type }} |
13 | 20 | run: | |
14 | | - curl -X POST \ |
15 | | - -H "Authorization: token ${{ secrets.AUTOMATION_ACCESS_TOKEN }}" \ |
| 21 | + set -euo pipefail |
| 22 | + curl -sS --fail-with-body -X POST \ |
| 23 | + -H "Authorization: Bearer ${{ secrets.AUTOMATION_ACCESS_TOKEN }}" \ |
16 | 24 | -H "Accept: application/vnd.github+json" \ |
| 25 | + -H "Content-Type: application/json" \ |
17 | 26 | https://api.github.com/repos/trycourier/mobile-automation-tests/dispatches \ |
18 | | - -d '{"event_type": "iOS-ReactNativeClassic", "client_payload": { "dummy_payload": "some_value_todo_logic" }}' |
19 | | - curl -X POST \ |
20 | | - -H "Authorization: token ${{ secrets.AUTOMATION_ACCESS_TOKEN }}" \ |
21 | | - -H "Accept: application/vnd.github+json" \ |
22 | | - https://api.github.com/repos/trycourier/mobile-automation-tests/dispatches \ |
23 | | - -d '{"event_type": "Android-ReactNativeClassic", "client_payload": { "dummy_payload": "some_value_todo_logic" }}' |
24 | | - curl -X POST \ |
25 | | - -H "Authorization: token ${{ secrets.AUTOMATION_ACCESS_TOKEN }}" \ |
26 | | - -H "Accept: application/vnd.github+json" \ |
27 | | - https://api.github.com/repos/trycourier/mobile-automation-tests/dispatches \ |
28 | | - -d '{"event_type": "iOS-ReactNativeExpo", "client_payload": { "dummy_payload": "some_value_todo_logic" }}' |
29 | | - curl -X POST \ |
30 | | - -H "Authorization: token ${{ secrets.AUTOMATION_ACCESS_TOKEN }}" \ |
31 | | - -H "Accept: application/vnd.github+json" \ |
32 | | - https://api.github.com/repos/trycourier/mobile-automation-tests/dispatches \ |
33 | | - -d '{"event_type": "Android-ReactNativeExpo", "client_payload": { "dummy_payload": "some_value_todo_logic" }}' |
| 27 | + -d "$(jq -n --arg et "${{ matrix.event_type }}" \ |
| 28 | + '{event_type: $et, client_payload: { dummy_payload: "some_value_todo_logic" } }')" |
0 commit comments