Skip to content

Commit

Permalink
Merge pull request #539 from ngrok/hkatz/e2e-prep-2
Browse files Browse the repository at this point in the history
Enable deny gate for 'safe to test' label
  • Loading branch information
hjkatz authored Dec 4, 2024
2 parents 39597eb + c68faf4 commit 5b03e07
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,26 @@ jobs:
runs-on: ubuntu-latest
needs:
- changes
# Runs If
# - commit is pushed to main on ngrok/ngrok-operator repo (i.e. the PR is merged)
# - PR contains the label 'safe to test' and changes to go code, charts, chartyaml, tests, or makefile
if: |
(github.event_name == 'push' && github.ref_name == 'main')
||
(
contains(github.event.pull_request.labels.*.name, 'safe to test')
&& (
(needs.changes.outputs.go == 'true') ||
(needs.changes.outputs.charts == 'true') ||
(needs.changes.outputs.chartyaml == 'true') ||
(needs.changes.outputs.tests == 'true') ||
(needs.changes.outputs.make == 'true')
)
)
(needs.changes.outputs.go == 'true') ||
(needs.changes.outputs.charts == 'true') ||
(needs.changes.outputs.chartyaml == 'true') ||
(needs.changes.outputs.tests == 'true') ||
(needs.changes.outputs.make == 'true')
permissions:
contents: read
pull-requests: read
steps:
- name: Confirm 'safe to test'
# PRs from forks must be labeled 'safe to test' to run e2e tests
# Merges to main are tested automatically
if: |
!(github.event_name == 'push' && github.ref_name == 'main')
&&
!(contains(github.event.pull_request.labels.*.name, 'safe to test'))
run: |
echo 'This PR is not labeled "safe to test", blocking e2e tests...'
exit 1 # intentionally fail the job
# checkout the repo at the PR's head sha (inside the fork's commits)
# this allows forks to test changes to the go code and e2e tests
- uses: actions/checkout@v3
Expand Down

0 comments on commit 5b03e07

Please sign in to comment.