Skip to content

Commit df30125

Browse files
committed
fix(ci): docker-publish version tag missing on workflow_dispatch
When docker-publish.yml is dispatched via workflow_dispatch (the backfill path for tags that were created with GITHUB_TOKEN and didn't fire downstream workflows), `type=ref,event=tag` produced no version tag — that pattern only fires on push:tag events. Result: the v0.9.0 GHCR image was pushed but only got the `:latest` tag, not `:v0.9.0`. Diagnosis: GHCR anonymous tags-list API after the v0.9.0 dispatch shows only `latest`: curl -fsS -H "Authorization: Bearer $token" \ https://ghcr.io/v2/dfrostar/neuralmind/tags/list → {"name":"dfrostar/neuralmind","tags":["latest"]} Fix: switch to `type=raw,value=${{ env.RELEASE_TAG }}` which works for both event paths (push:tag → RELEASE_TAG=github.ref_name, workflow_dispatch → RELEASE_TAG=inputs.tag). The verify-pull job already reads the first tag from metadata-action outputs, so it naturally pulls the version-specific tag for its smoke test. After this merges, the v0.9.0 image needs to be re-built: gh workflow run docker-publish.yml --ref main -f tag=v0.9.0 This will overwrite `:latest` (same content) and create `:v0.9.0`. Future push:tag runs (once RELEASE_PLEASE_TOKEN is set per #98) are also fixed by the same change — RELEASE_TAG is set from github.ref_name in env, and type=raw reads it directly. https://claude.ai/code/session_01SH6iHNAqeMJHXdq7ubVcuJ
1 parent 4c8550e commit df30125

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,15 @@ jobs:
6969
uses: docker/metadata-action@v5
7070
with:
7171
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
72-
# type=ref,event=tag → :v0.9.0 from the pushed tag
73-
# type=raw,latest → :latest only when the tag has no `-`
74-
# suffix (excludes v0.10.0-rc1, v1.0.0-beta1, etc.).
72+
# type=raw,value=${{ env.RELEASE_TAG }} → :v0.9.0 from RELEASE_TAG.
73+
# This works for BOTH push:tag (RELEASE_TAG = github.ref_name)
74+
# AND workflow_dispatch (RELEASE_TAG = inputs.tag). The earlier
75+
# `type=ref,event=tag` form only fired on push:tag, so workflow-
76+
# dispatched runs produced only `:latest` with no version tag.
77+
# type=raw,latest → :latest only when the tag has no `-` suffix
78+
# (excludes v0.10.0-rc1, v1.0.0-beta1, etc.).
7579
tags: |
76-
type=ref,event=tag
80+
type=raw,value=${{ env.RELEASE_TAG }}
7781
type=raw,value=latest,enable=${{ !contains(env.RELEASE_TAG, '-') }}
7882
labels: |
7983
org.opencontainers.image.title=NeuralMind

0 commit comments

Comments
 (0)