-
Notifications
You must be signed in to change notification settings - Fork 23
33 lines (30 loc) · 1021 Bytes
/
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
32
33
name: Test Report
on: [pull_request]
env:
USER: runner
# Cancel the current workflow when new commit pushed
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
always-success:
name: "I will always success"
runs-on: [self-hosted, linux, nixos]
steps:
- name: "Success"
run: echo "FOO BAR BAZ"
get-report:
name: "Getting report"
if: ${{ success() }}
runs-on: [self-hosted, linux, nixos]
needs: [always-success]
steps:
- name: "Fetch report"
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.T1_INHOUSE_PAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"${{ secrets.T1_INHOUSE_URL }}" \
-d '{"event_type":"ci_success","client_payload":{"commit_sha": "${{ github.event.pull_request.head.sha }}","pr_id": "${{ github.event.pull_request.number }}" }}'