From ea69843ae6aa30cb50a56a237453dcb1e82663f5 Mon Sep 17 00:00:00 2001 From: Helge Sverre Date: Tue, 12 May 2026 12:30:46 +0200 Subject: [PATCH] Overlay Dockerfile from main on backfill runs Pre-existing tags (v1.1.0 .. v1.13.5) were created before the Dockerfile landed on main, so checking them out gives no Dockerfile and the build fails. On workflow_dispatch runs, fetch main and check out the current Dockerfile + .dockerignore over the tag's source tree. Push-triggered runs are unaffected -- they get the Dockerfile from the tag itself. --- .github/workflows/docker.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 28639e1..248b9e3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -58,6 +58,16 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ steps.ref.outputs.ref }} + fetch-depth: 0 + + - name: Overlay Dockerfile from main (backfill runs) + # Tags published before Docker support was added don't have a Dockerfile. + # On workflow_dispatch backfills, copy the current Dockerfile + .dockerignore + # from main on top of the tag's source tree so old releases can still be built. + if: github.event_name == 'workflow_dispatch' + run: | + git fetch origin main --depth=1 + git checkout origin/main -- Dockerfile .dockerignore - name: Set up QEMU uses: docker/setup-qemu-action@v3