From e2622ec8e4b253663f4da9baaa42e5d875544cee Mon Sep 17 00:00:00 2001 From: Chingis S Date: Wed, 18 Nov 2026 22:45:49 +0300 Subject: [PATCH 1/2] Combine multi-arch images from the digests this run pushed Every workflow run pushes the same per-architecture tags, and the publish job combined whatever they held, so an overlapping run could replace one architecture before a release was published. wodby/mariadb r19 shipped different MariaDB versions on amd64 and arm64 this way. Build jobs now push through wodby/images arch-image-push, which records the pushed digest. Publish jobs load those records with arch-image-pins, and the Makefile resolves each buildx imagetools create source to its recorded digest, failing when this run did not push it. A per-ref concurrency group keeps runs of one branch or tag from overlapping, so an older master run cannot finish last and move floating tags back. --- .github/workflows/workflow.yml | 18 ++++++++++-------- Makefile | 9 +++++++-- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 0ec4375..9aa107e 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -11,6 +11,12 @@ on: pull_request: +# Runs of one branch or tag never overlap, so an older master run cannot finish +# last and move floating tags back; a newer pending run replaces an older one. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + env: PYTHON315: '3.15.2' PYTHON314: '3.14.10' @@ -89,14 +95,9 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Push architecture image if: github.event_name == 'push' - env: - PYTHON_VER: ${{ matrix.python.version }} - ARCH: ${{ matrix.arch }} - PYTHON_DEV: ${{ matrix.dev }} - WODBY_USER_ID: ${{ matrix.user_id }} - WODBY_GROUP_ID: ${{ matrix.group_id }} - run: make push - + uses: wodby/images/.github/actions/arch-image-push@2da5f02ec3dffc5cb3331152e01e3c89874b0bfe + with: + image: ${{ steps.build-image.outputs.image }} push: if: github.event_name == 'push' runs-on: ubuntu-latest @@ -122,6 +123,7 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - uses: wodby/images/.github/actions/arch-image-pins@2da5f02ec3dffc5cb3331152e01e3c89874b0bfe - uses: ./.github/actions with: version: ${{ matrix.python.version }} diff --git a/Makefile b/Makefile index d965f11..26e2bd8 100644 --- a/Makefile +++ b/Makefile @@ -79,10 +79,15 @@ buildx-push: --build-arg WODBY_GROUP_ID=$(WODBY_GROUP_ID) \ ./ +# CI combines the exact architecture images this workflow run pushed; see +# wodby/images arch-image-pins. Per-architecture tags are shared by every run, +# so an overlapping run may already have replaced one of them. +arch-image = $(if $(ARCH_IMAGE_PINS),$(or $(shell cat '$(ARCH_IMAGE_PINS)/$(subst :,_,$(subst /,_,$(1)))' 2>/dev/null),$(error No digest of $(1) was pushed by this workflow run)),$(1)) + buildx-imagetools-create: docker buildx imagetools create -t $(REPO):$(IMAGETOOLS_TAG) \ - $(REPO):$(TAG)-amd64 \ - $(REPO):$(TAG)-arm64 + $(call arch-image,$(REPO):$(TAG)-amd64) \ + $(call arch-image,$(REPO):$(TAG)-arm64) .PHONY: buildx-imagetools-create test: From c7cf7b752808e9512328ce4f3bd0d5ef74ab9449 Mon Sep 17 00:00:00 2001 From: Chingis S Date: Wed, 18 Nov 2026 22:51:22 +0300 Subject: [PATCH 2/2] Keep runs of different events in separate concurrency groups GitHub replaces a pending run with a newer one in the same concurrency group. With only the ref in the group, a scheduled or manual run on master could replace a queued push run, and that commit would never be built. The group now includes the event name, so only a newer run of the same event supersedes a pending one. This also restores the blank line between jobs that the previous commit dropped after the push step. --- .github/workflows/workflow.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 9aa107e..0483ddd 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -11,10 +11,11 @@ on: pull_request: -# Runs of one branch or tag never overlap, so an older master run cannot finish -# last and move floating tags back; a newer pending run replaces an older one. +# Runs of one event and branch or tag never overlap, so an older master run +# cannot finish last and move floating tags back. A newer pending run of the +# same event replaces an older one; other events never replace each other. concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: false env: @@ -98,6 +99,7 @@ jobs: uses: wodby/images/.github/actions/arch-image-push@2da5f02ec3dffc5cb3331152e01e3c89874b0bfe with: image: ${{ steps.build-image.outputs.image }} + push: if: github.event_name == 'push' runs-on: ubuntu-latest