Skip to content

ci(docker): don't cancel overlapping builds, guard :latest#20890

Merged
ethernet8023 merged 1 commit into
mainfrom
fix/docker-push
May 6, 2026
Merged

ci(docker): don't cancel overlapping builds, guard :latest#20890
ethernet8023 merged 1 commit into
mainfrom
fix/docker-push

Conversation

@ethernet8023

Copy link
Copy Markdown
Collaborator

Switch top-level concurrency to cancel-in-progress=false so every push to main gets its own SHA-tagged image published — no more discarded builds when commits land back-to-back.

Guard the :latest tag with a second job that has its own concurrency group with cancel-in-progress=true plus a git-ancestor check against the revision label on the current :latest. Together these guarantee :latest only ever moves forward in history: a slower run whose commit isn't a descendant of the current :latest refuses to clobber it, and a newer push mid-way through the move-latest job preempts the older one before it can retag.

What does this PR do?

Related Issue

Fixes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Every main push publishes nousresearch/hermes-agent:sha- with an org.opencontainers.image.revision label embedded.
  • move-latest job reads that label off :latest, runs merge-base --is-ancestor, and only retags (via buildx imagetools create, registry-side, no rebuild) if our commit strictly descends.
  • fetch-depth bumped to 1000 so merge-base has the history it needs.
  • Release tag flow unchanged (unique tag, no race).

How to Test

  1. push to main
  2. push to main again
  3. note docker build & push still goes

Switch top-level concurrency to cancel-in-progress=false so every push
to main gets its own SHA-tagged image published — no more discarded
builds when commits land back-to-back.

Guard the :latest tag with a second job that has its own concurrency
group with cancel-in-progress=true plus a git-ancestor check against
the revision label on the current :latest. Together these guarantee
:latest only ever moves forward in history: a slower run whose commit
isn't a descendant of the current :latest refuses to clobber it, and
a newer push mid-way through the move-latest job preempts the older
one before it can retag.

- Every main push publishes nousresearch/hermes-agent:sha-<commit>
  with an org.opencontainers.image.revision label embedded.
- move-latest job reads that label off :latest, runs merge-base
  --is-ancestor, and only retags (via buildx imagetools create,
  registry-side, no rebuild) if our commit strictly descends.
- fetch-depth bumped to 1000 so merge-base has the history it needs.
- Release tag flow unchanged (unique tag, no race).
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: fix/docker-push vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 7420 on HEAD, 7420 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 3906 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working area/docker Docker image, Compose, packaging P3 Low — cosmetic, nice to have labels May 6, 2026
@ethernet8023 ethernet8023 merged commit 53a0249 into main May 6, 2026
9 of 10 checks passed
@ethernet8023 ethernet8023 deleted the fix/docker-push branch May 6, 2026 21:38
JinyuID pushed a commit to JinyuID/hermes-agent that referenced this pull request May 11, 2026
ci(docker): don't cancel overlapping builds, guard :latest
jsboige pushed a commit to jsboige/hermes-agent that referenced this pull request May 14, 2026
ci(docker): don't cancel overlapping builds, guard :latest
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
ci(docker): don't cancel overlapping builds, guard :latest
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
ci(docker): don't cancel overlapping builds, guard :latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docker Docker image, Compose, packaging P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants