-
Notifications
You must be signed in to change notification settings - Fork 25
31 lines (29 loc) · 1.05 KB
/
remote-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Remote Test Trigger
on:
pull_request:
jobs:
trigger-remote-test:
runs-on: ubuntu-latest
steps:
- name: Trigger Remote Test Workflow
env:
GH_TOKEN: ${{ secrets.PASEO_RUNTIME_CI_PAT }}
run: |
response=$(curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GH_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/Zondax/paseo-runtime-test/actions/workflows/webhook-pr-trigger.yml/dispatches \
-d '{
"ref": "main",
"inputs": {
"target_repo": "https://github.com/${{ github.repository }}",
"target_branch": "${{ github.head_ref }}",
"pr_number": "${{ github.event.pull_request.number }}"
}
}' -w "%{http_code}" -o /dev/null)
if [ "$response" != "204" ]; then
echo "Failed to trigger remote test. HTTP status code: $response"
exit 1
fi