Skip to content

Commit 6c19d44

Browse files
committed
Prevent duplicate jobs during privileged runs
Signed-off-by: Willem Pienaar <git@willem.co>
1 parent 18c966c commit 6c19d44

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/privileged.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ on:
1010
jobs:
1111
integration-test-python:
1212
# all jobs MUST have this if check for 'ok-to-test' or 'approved' for security purposes.
13-
if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved')
13+
if: (github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'ok-to-test'))
14+
|| (github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved')))
1415
runs-on: ubuntu-latest
1516
container: gcr.io/kf-feast/feast-ci:latest
1617
steps:

0 commit comments

Comments
 (0)