Skip to content

Trigger CI on published releases so versioned Docker tags get pushed - #27

Merged
DimaMolod merged 1 commit into
mainfrom
fix/publish-versioned-docker-tags
Aug 10, 2026
Merged

Trigger CI on published releases so versioned Docker tags get pushed#27
DimaMolod merged 1 commit into
mainfrom
fix/publish-versioned-docker-tags

Conversation

@DimaMolod

Copy link
Copy Markdown
Collaborator

The docker job has a "Build and push : on release" step gated on github.event_name == 'release', but the workflow's on: block only listed push and pull_request. A workflow that is never triggered by a release event can never satisfy that condition, so the step has never run.

Evidence

Across the last 100 workflow runs:

event runs
push 69
pull_request 31
release 0

Meanwhile nine releases have been published (1.0.0 through 1.4.1). Docker Hub correspondingly carries a single tag — confirmed two ways:

  • Hub API /v2/repositories/kosinskilab/alphajudge/tagscount: 1
  • Registry v2 /v2/kosinskilab/alphajudge/tags/list["latest"]

That one tag comes from the separate push-to-main step, which is why it exists and nothing else does.

The fix

on:
  push:
    branches: [ "**" ]
  pull_request:
    branches: [ "**" ]
  release:
    types: [published]

Adding the trigger is sufficient; no job conditions need changing:

  • test has no if:, so it runs on release events and satisfies needs: test
  • docker's existing if: already admits release/published
  • coverage-pages stays gated on push-to-main and correctly skips

On a published release the PR-only and push-to-main steps skip, and the release step pushes <user>/alphajudge:<tag_name>.

As a side effect this also clears the static-analysis warning on github.event.release.tag_name, which was flagged as an invalid context precisely because no release trigger was declared.

Not retroactive

Images for the already-published 1.0.0–1.4.1 releases are not backfilled by this change; those would need a manual build/push or a re-published release.

🤖 Generated with Claude Code

The docker job has a "Build and push :<tag> on release" step gated on
github.event_name == 'release', but the workflow's on: block only listed push
and pull_request. A workflow that is never triggered by a release event can
never satisfy that condition, so the step has never run.

Across the last 100 workflow runs the event breakdown is push 69,
pull_request 31, release 0, while nine releases have been published (1.0.0
through 1.4.1). Docker Hub correspondingly carries a single tag: both the Hub
API (count: 1) and the registry v2 tags/list return only ":latest", which is
refreshed by the separate push-to-main step.

Adding the release trigger is sufficient. The test job has no if: condition so
it runs on release events, the docker job's existing if: already admits them,
and coverage-pages stays gated on push-to-main. On a published release the
PR-only and push-to-main steps skip and the release step pushes
<user>/alphajudge:<tag_name>.

Note this is not retroactive: images for the already-published 1.0.0-1.4.1
releases would still need a manual build or a re-published release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@DimaMolod
DimaMolod merged commit 87f3098 into main Aug 10, 2026
8 checks passed
@DimaMolod
DimaMolod deleted the fix/publish-versioned-docker-tags branch August 10, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant