Skip to content

Commit fbdc98d

Browse files
Updating e2e workflow to report status on merge commit
Signed-off-by: Vishesh Tanksale <vtanksale@nvidia.com>
1 parent 983e767 commit fbdc98d

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/e2e.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,18 @@ on:
2020
types:
2121
- completed
2222
branches:
23-
- "pull-request/[0-9]+"
23+
- "pull-request/**"
2424
- main
2525
- release-*
2626

2727
jobs:
2828
e2e-tests:
2929
runs-on: linux-amd64-cpu4
3030
if: ${{ github.event.workflow_run.conclusion == 'success' }} && ${{ github.event.workflow_run.event == 'push' }}
31+
permissions:
32+
contents: read
33+
checks: write
34+
statuses: write
3135
steps:
3236
- name: Check out code
3337
uses: actions/checkout@v4
@@ -76,6 +80,21 @@ jobs:
7680
path: ./e2e_logs/
7781
retention-days: 15
7882

83+
# This makes the result appear on the merged commit's Checks tab
84+
- name: Report status on merged commit
85+
if: always()
86+
uses: actions/github-script@v7
87+
with:
88+
script: |
89+
await github.rest.checks.create({
90+
owner: context.repo.owner,
91+
repo: context.repo.repo,
92+
name: 'End-to-end Tests',
93+
head_sha: '${{ github.event.workflow_run.head_sha }}',
94+
status: 'completed',
95+
conclusion: '${{ job.status }}' // success | failure | cancelled
96+
})
97+
7998
- name: Send Slack alert notification
8099
id: slack
81100
if: false

0 commit comments

Comments
 (0)