-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (30 loc) · 1.34 KB
/
ci_e2e_tests_result.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
32
name: Sending CI E2E tests result to trigger repository
on:
workflow_run:
workflows: [CI E2E and API tests]
types: [completed]
jobs:
tests-result:
runs-on: ubuntu-latest
steps:
- run: echo 'CI E2E tests result -- ${{ github.event.workflow_run.conclusion }}'
- name: Get trigger repository name
uses: actions/download-artifact@v4
with:
name: trigger_repository_name
github-token: ${{ github.token }}
repository: ${{ github.repository }}
run-id: ${{ github.event.workflow_run.id }}
- name: Set trigger repository name env variable
run: |
value=`cat trigger_repository.txt`
echo "TRIGGER_REPOSITORY=$value" >> "$GITHUB_ENV"
- name: Triggering E2E tests result workflow in ${{ env.TRIGGER_REPOSITORY }} repository
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.E2E_TESTS_PAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ env.TRIGGER_REPOSITORY }}/actions/workflows/e2e-tests-result.yaml/dispatches \
-d "{\"ref\":\"dev\", \"inputs\":{\"tests_run_id\":\"${{ github.event.workflow_run.id }}\", \"tests_result\":\"${{ github.event.workflow_run.conclusion }}\"}}"