Skip to content

Commit a5f94ef

Browse files
committed
fix(ci): skip e2e docker push and e2e tests for fork PRs
Fork PRs receive a read-only GITHUB_TOKEN that cannot push images to the org's GHCR package registry. Pass push: false for fork PRs so the docker build still validates compilation, but skip the push and e2e test jobs which require the pushed images.
1 parent a69ef06 commit a5f94ef

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎.github/workflows/branch-e2e.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
component: gateway
1717
platform: linux/arm64
1818
runner: build-arm64
19+
# Fork PRs cannot push to the org's GHCR — build-only to validate.
20+
push: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
1921

2022
build-cluster:
2123
if: contains(github.event.pull_request.labels.*.name, 'test:e2e')
@@ -24,8 +26,11 @@ jobs:
2426
component: cluster
2527
platform: linux/arm64
2628
runner: build-arm64
29+
push: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
2730

2831
e2e:
32+
# E2e tests need the pushed images, so they can only run for internal PRs.
33+
if: github.event.pull_request.head.repo.full_name == github.repository
2934
needs: [build-gateway, build-cluster]
3035
uses: ./.github/workflows/e2e-test.yml
3136
with:

0 commit comments

Comments
 (0)