fix(ci): enable e2e for fork PRs via pull_request_target #490
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Branch E2E Checks | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled] | |
| permissions: | |
| contents: read | |
| packages: read | |
| jobs: | |
| e2e: | |
| if: contains(github.event.pull_request.labels.*.name, 'test:e2e') | |
| name: E2E | |
| runs-on: build-arm64 | |
| timeout-minutes: 45 | |
| container: | |
| image: ghcr.io/nvidia/openshell/ci:latest | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| options: --privileged | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock | |
| env: | |
| MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Single platform so buildx uses --load (no registry push needed). | |
| DOCKER_PLATFORM: linux/arm64 | |
| EXTRA_CARGO_FEATURES: openshell-core/dev-settings | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install tools | |
| run: mise install | |
| - name: Install SSH client | |
| run: apt-get update && apt-get install -y --no-install-recommends openssh-client && rm -rf /var/lib/apt/lists/* | |
| - name: Run E2E tests | |
| run: | | |
| mise run e2e |