Skip to content

Commit 8d654f9

Browse files
committed
fix(ci): run e2e as a single local job without GHCR push
Restructure branch e2e from three separate jobs (build-gateway, build- cluster, e2e) that push images to GHCR into a single job that builds and tests locally. This eliminates the GHCR write permission requirement that blocked fork PRs. The build scripts already default to --load (no push) for single- platform builds, and 'mise run e2e' orchestrates the full pipeline: build images locally, start a local registry, boot the cluster, and run tests. No workflow_call changes needed. Permissions reduced from packages: write to packages: read (only needed to pull the CI container image).
1 parent a69ef06 commit 8d654f9

File tree

1 file changed

+28
-20
lines changed

1 file changed

+28
-20
lines changed

.github/workflows/branch-e2e.yml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,36 @@ on:
66

77
permissions:
88
contents: read
9-
packages: write
9+
packages: read
1010

1111
jobs:
12-
build-gateway:
12+
e2e:
1313
if: contains(github.event.pull_request.labels.*.name, 'test:e2e')
14-
uses: ./.github/workflows/docker-build.yml
15-
with:
16-
component: gateway
17-
platform: linux/arm64
18-
runner: build-arm64
14+
name: E2E
15+
runs-on: build-arm64
16+
timeout-minutes: 45
17+
container:
18+
image: ghcr.io/nvidia/openshell/ci:latest
19+
credentials:
20+
username: ${{ github.actor }}
21+
password: ${{ secrets.GITHUB_TOKEN }}
22+
options: --privileged
23+
volumes:
24+
- /var/run/docker.sock:/var/run/docker.sock
25+
env:
26+
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
# Single platform so buildx uses --load (no registry push needed).
28+
DOCKER_PLATFORM: linux/arm64
29+
EXTRA_CARGO_FEATURES: openshell-core/dev-settings
30+
steps:
31+
- uses: actions/checkout@v4
1932

20-
build-cluster:
21-
if: contains(github.event.pull_request.labels.*.name, 'test:e2e')
22-
uses: ./.github/workflows/docker-build.yml
23-
with:
24-
component: cluster
25-
platform: linux/arm64
26-
runner: build-arm64
33+
- name: Install tools
34+
run: mise install
2735

28-
e2e:
29-
needs: [build-gateway, build-cluster]
30-
uses: ./.github/workflows/e2e-test.yml
31-
with:
32-
image-tag: ${{ github.sha }}
33-
runner: build-arm64
36+
- name: Install SSH client
37+
run: apt-get update && apt-get install -y --no-install-recommends openssh-client && rm -rf /var/lib/apt/lists/*
38+
39+
- name: Run E2E tests
40+
run: |
41+
mise run e2e

0 commit comments

Comments
 (0)