Skip to content

Commit 813157b

Browse files
authored
Update workflow.yml
1 parent 9e498ca commit 813157b

File tree

1 file changed

+14
-19
lines changed

1 file changed

+14
-19
lines changed

.github/workflows/workflow.yml

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,21 @@ on:
88
jobs:
99
notify-app:
1010
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
event_type:
14+
- iOS-ReactNativeClassic
15+
- Android-ReactNativeClassic
16+
- iOS-ReactNativeExpo
17+
- Android-ReactNativeExpo
1118
steps:
12-
- name: Dispatch App Build
19+
- name: Dispatch ${{ matrix.event_type }}
1320
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 }}" \
1624
-H "Accept: application/vnd.github+json" \
25+
-H "Content-Type: application/json" \
1726
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

Comments
 (0)