Skip to content

Commit 33505e7

Browse files
add sentinel job
1 parent ae81692 commit 33505e7

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/build-and-test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,25 @@ jobs:
154154
version: v1.62
155155
- name: Lint
156156
run: make lint
157+
sentinel:
158+
name: sentinel
159+
if: github.event_name == 'repository_dispatch' ||
160+
github.event.pull_request.head.repo.full_name == github.repository
161+
permissions:
162+
statuses: write
163+
needs:
164+
- test
165+
- lint
166+
runs-on: ubuntu-latest
167+
steps:
168+
- uses: guibranco/github-status-action-v2@0849440ec82c5fa69b2377725b9b7852a3977e76 # v1.1.13
169+
with:
170+
authToken: ${{secrets.GITHUB_TOKEN}}
171+
# Write an explicit status check called "Sentinel" which will only pass if this code really runs.
172+
# This should always be a required check for PRs.
173+
context: 'Sentinel'
174+
description: 'All required checks passed'
175+
state: 'success'
176+
# Write to the PR commit SHA if it's available as we don't want the merge commit sha,
177+
# otherwise use the current SHA for any other type of build.
178+
sha: ${{ github.event.pull_request.head.sha || github.sha }}

0 commit comments

Comments
 (0)