Skip to content

Commit 7e94e95

Browse files
committed
ci: Only require approval for camera tests on fork PRs
'' is falsy in GitHub expressions, so the truthy branch of the conditional environment never applied and every PR required approval. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
1 parent 347cfbe commit 7e94e95

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/camera-test-picamera2.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ permissions:
1010
jobs:
1111
trigger-camera-tests:
1212
runs-on: [self-hosted, camera-test-bridge]
13-
environment: ${{ github.event.pull_request.head.repo.full_name == github.repository && '' || 'camera-test' }}
13+
# Fork PRs require manual approval through the camera-test environment.
14+
# Note the condition must be inverted so that the truthy branch holds the
15+
# non-empty string, as '' is falsy and would fall through to the || branch.
16+
environment: ${{ github.event.pull_request.head.repo.full_name != github.repository && 'camera-test' || '' }}
1417
timeout-minutes: 120
1518
steps:
1619
- name: Checkout camera_tester

0 commit comments

Comments
 (0)