Compare commits

...
Author SHA1 Message Date
Cédric VerstraetenandClaude Opus 5.5 798e17781f 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 <noreply@anthropic.com>
2026-11-27 09:12:34 +00:00
Cédric VerstraetenandClaude Opus 5.5 b7af06a74b ci: fix nightly build matrix and manifest creation
- Drop arm/v6 and arm/v7: the golang/debian trixie base images have no
  arm/v6, so the nightly failed every run and fail-fast cancelled the
  other arm builds. Releases only ship amd64 + arm64.
- Set fail-fast: false so one broken architecture doesn't hide the others.
- Create the multi-arch manifest in a single job after all builds, instead
  of parallel create/--append calls that raced each other.

Refs #365

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 09:11:42 +00:00
+25 -24
View File
@@ -8,21 +8,29 @@ on:
workflow_dispatch:
jobs:
nightly-build-amd64:
# Build one image per architecture. Only architectures we also ship in
# 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.
fail-fast: false
matrix:
architecture: [amd64]
architecture: [amd64, arm64]
steps:
- name: Login to DockerHub
uses: docker/login-action@v3
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
@@ -31,32 +39,25 @@ jobs:
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Run Buildx
run: docker buildx build --build-arg VERSION=$(echo $GITHUB_SHA | cut -c1-7) --platform linux/${{matrix.architecture}} -t kerberos/agent-nightly:arch-$(echo ${{matrix.architecture}} | tr / -)-$(echo $GITHUB_SHA | cut -c1-7) --push .
- name: Create new and append to manifest
run: docker buildx imagetools create -t kerberos/agent-nightly:$(echo $GITHUB_SHA | cut -c1-7) kerberos/agent-nightly:arch-$(echo ${{matrix.architecture}} | tr / -)-$(echo $GITHUB_SHA | cut -c1-7)
nightly-build-other:
run: docker buildx build --build-arg VERSION=$(echo $GITHUB_SHA | cut -c1-7) --platform linux/${{matrix.architecture}} -t kerberos/agent-nightly:arch-${{matrix.architecture}}-$(echo $GITHUB_SHA | cut -c1-7) --push .
# Create the multi-arch manifest once, after all architectures are pushed.
# Previously each build job created/appended to it in parallel, so the
# result depended on which job finished last.
nightly-manifest:
runs-on: ubuntu-latest
strategy:
matrix:
architecture: [arm64, arm/v7, arm/v6]
needs: nightly-build
steps:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: master
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Run Buildx
run: docker buildx build --build-arg VERSION=$(echo $GITHUB_SHA | cut -c1-7) --platform linux/${{matrix.architecture}} -t kerberos/agent-nightly:arch-$(echo ${{matrix.architecture}} | tr / -)-$(echo $GITHUB_SHA | cut -c1-7) --push .
- name: Create new and append to manifest
run: docker buildx imagetools create --append -t kerberos/agent-nightly:$(echo $GITHUB_SHA | cut -c1-7) kerberos/agent-nightly:arch-$(echo ${{matrix.architecture}} | tr / -)-$(echo $GITHUB_SHA | cut -c1-7)
- name: Create manifest
run: |
SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-7)
docker buildx imagetools create -t kerberos/agent-nightly:$SHORT_SHA \
kerberos/agent-nightly:arch-amd64-$SHORT_SHA \
kerberos/agent-nightly:arch-arm64-$SHORT_SHA