From a0a622a15500ed613491b766687fc4a3a5651996 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Tue, 17 Feb 2026 05:27:38 -0800 Subject: [PATCH] ci: use normal Docker builds for fork PRs instead of Depot (#22268) Co-authored-by: Amp --- .github/workflows/docker-test.yml | 33 +++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index 6b7f270226..92265c863a 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -15,7 +15,6 @@ on: jobs: build: - if: github.repository == 'paradigmxyz/reth' timeout-minutes: 45 runs-on: ubuntu-latest permissions: @@ -31,10 +30,22 @@ jobs: echo "sha=${{ github.sha }}" >> "$GITHUB_OUTPUT" echo "describe=$(git describe --always --tags)" >> "$GITHUB_OUTPUT" + - name: Detect fork + id: fork + run: | + if [ "${{ github.event_name }}" = "pull_request" ] && [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then + echo "is_fork=true" >> "$GITHUB_OUTPUT" + else + echo "is_fork=false" >> "$GITHUB_OUTPUT" + fi + + # Depot build (upstream only) - name: Set up Depot CLI + if: steps.fork.outputs.is_fork == 'false' uses: depot/setup-action@v1 - - name: Build reth image + - name: Build reth image (Depot) + if: steps.fork.outputs.is_fork == 'false' uses: depot/bake-action@v1 env: DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }} @@ -46,6 +57,24 @@ jobs: targets: ${{ inputs.hive_target }} push: false + # Docker build (forks) + - name: Set up Docker Buildx + if: steps.fork.outputs.is_fork == 'true' + uses: docker/setup-buildx-action@v3 + + - name: Build reth image (Docker) + if: steps.fork.outputs.is_fork == 'true' + uses: docker/bake-action@v6 + env: + VERGEN_GIT_SHA: ${{ steps.git.outputs.sha }} + VERGEN_GIT_DESCRIBE: ${{ steps.git.outputs.describe }} + with: + files: docker-bake.hcl + targets: ${{ inputs.hive_target }} + push: false + set: | + *.dockerfile=Dockerfile + - name: Upload reth image uses: actions/upload-artifact@v6 with: