Skip to content

Commit 4e9af73

Browse files
committed
Resolve workflow vulnerabilities
1 parent 911ea51 commit 4e9af73

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/pr.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,18 @@ on:
2121
- 'v[0-9]+.[0-9]+.x'
2222

2323
jobs:
24+
fail-if-unsafe:
25+
runs-on: ubuntu-latest
26+
if: ${{ !contains( github.event.pull_request.labels.*.name, 'safe-to-test') }}
27+
steps:
28+
- name: Fail if not marked as safe to test
29+
run: |
30+
echo "CI will not run on a PR unless it has the safe-to-test label applied"
31+
exit 1
2432
test:
2533
name: Lint & test
2634
runs-on: [ self-hosted, Linux ]
35+
if: ${{ contains( github.event.pull_request.labels.*.name, 'safe-to-test') }}
2736
container:
2837
image: golang:1.24
2938

0 commit comments

Comments
 (0)