From 798e17781fa7bb23e0031b0a5e6841834820e168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Verstraeten?= Date: Fri, 27 Nov 2026 09:12:34 +0000 Subject: [PATCH] ci: nightly builds exactly the master commit it tags Run only on master and check out the triggering commit instead of re-resolving master, so the image tag ($GITHUB_SHA) always matches the code that was built. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/nightly-build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 8984eec..f2129c0 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -12,6 +12,9 @@ jobs: # releases (amd64 + arm64): the golang/debian trixie base images don't # provide arm/v6, which made every nightly fail since February. nightly-build: + # Nightlies always build the latest master: schedules run on the default + # branch, and manual runs from any other branch are skipped. + if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest strategy: # Let every architecture finish, so one broken build doesn't hide the others. @@ -24,10 +27,10 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + # Check out the triggering commit (master HEAD) so the code matches the + # $GITHUB_SHA used in the image tags. - name: Checkout uses: actions/checkout@v4 - with: - ref: master - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx