Skip to content

Simplify Docker tag publishing workflow#1333

Merged
lovasoa merged 1 commit into
mainfrom
simplify-docker-tag-suffix-names
Jun 14, 2026
Merged

Simplify Docker tag publishing workflow#1333
lovasoa merged 1 commit into
mainfrom
simplify-docker-tag-suffix-names

Conversation

@lovasoa

@lovasoa lovasoa commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the generated Docker matrix plus exclude rules with explicit platform/variant entries carrying their tag suffix.
  • Remove the shell step that recomputed those suffixes from the platform name.
  • Remove Docker metadata JSON parsing from the final manifest job; the manifest tags are now spelled directly from the Git ref and variant suffix.

Complexity diagnosis

  • The same tag suffix concept was previously derived in several places: matrix exclusions, a shell step, cache names, artifact names, and final manifest tags.
  • The Docker matrix generated impossible or special-case combinations and then excluded them, which made the actual published images harder to see.
  • The final manifest step used docker/metadata-action output only to parse it back into CLI flags, obscuring that it publishes just the current branch/tag and latest on release tags.

Validation

  • git diff --check -- .github/workflows/ci.yml
  • actionlint .github/workflows/ci.yml

@lovasoa lovasoa force-pushed the simplify-docker-tag-suffix-names branch 2 times, most recently from a04d296 to 07fb509 Compare June 14, 2026 20:18
@lovasoa lovasoa marked this pull request as ready for review June 14, 2026 20:19
@lovasoa lovasoa force-pushed the simplify-docker-tag-suffix-names branch from 07fb509 to 30cd940 Compare June 14, 2026 20:19
@lovasoa lovasoa force-pushed the simplify-docker-tag-suffix-names branch from 30cd940 to 3cb46d5 Compare June 14, 2026 20:28

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3cb46d5455

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
tags=(-t "${REGISTRY_IMAGE}:${GITHUB_REF_NAME}${TAG_SUFFIX}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Sanitize the ref before using it as a Docker tag

When a valid release tag matching the workflow's v* filter contains Docker-invalid characters, such as the valid SemVer tag v1.2.3+build.1, this constructs an invalid image reference and docker buildx imagetools create fails, preventing the version and latest manifests from being published. The removed docker/metadata-action automatically replaced invalid tag-character sequences with - as documented in its tag sanitization behavior, so preserve equivalent sanitization before constructing these tags.

Useful? React with 👍 / 👎.

@lovasoa lovasoa merged commit fa69a14 into main Jun 14, 2026
51 checks passed
@lovasoa lovasoa deleted the simplify-docker-tag-suffix-names branch June 14, 2026 20:37
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