Skip to content

fix(ci): strip inline comments from docker metadata tags block#453

Merged
arabold merged 1 commit into
mainfrom
claude/docker-build-failure-8412ed
Jul 22, 2026
Merged

fix(ci): strip inline comments from docker metadata tags block#453
arabold merged 1 commit into
mainfrom
claude/docker-build-failure-8412ed

Conversation

@arabold

@arabold arabold commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • The Docker publish job of the Release workflow was failing at the "Extract Docker metadata" step.
  • Root cause: the tags: input to docker/metadata-action uses a YAML literal block scalar (|), where # is not a YAML comment but literal text. The trailing # e.g., ... comments on each tag line were being sent to the action verbatim, corrupting the enable/value attributes it parses (e.g. enable=true # Always tag latest on main branch release fails strict boolean parsing).
  • This bug was latent for a while but only became a hard failure after the docker/metadata-action@v5 -> v6 bump (7087ebb), which validates the enable attribute more strictly.
  • Fix: move the explanatory comments to real YAML comment lines above the block instead of inline within it.

Side effect to be aware of

Because the job failed before the push step ran, the v2.4.3 Docker image was never published to GHCR — ghcr.io/arabold/docs-mcp-server:latest still points at 2.4.2. This PR only fixes the workflow going forward; publishing the missing 2.4.3 image is a separate follow-up.

Test plan

  • Validated the modified YAML parses correctly (js-yaml)
  • Confirm the "Build and Push Docker Image to GHCR" job succeeds on the next release run

The `tags:` input to docker/metadata-action uses a YAML literal block
scalar (`|`), where `#` is not a YAML comment but literal text. The
trailing "# e.g., ..." comments were being sent to the action verbatim,
corrupting the `enable`/`value` attributes on each line.

This caused a hard failure after the metadata-action v5->v6 bump
(which made enable-attribute validation stricter):

  Invalid value for enable attribute: true # Always tag latest on main branch release

Move the explanations to real comment lines above the block instead.
Copilot AI review requested due to automatic review settings July 22, 2026 17:40
@arabold
arabold merged commit 9aa0864 into main Jul 22, 2026
2 checks passed
@arabold
arabold deleted the claude/docker-build-failure-8412ed branch July 22, 2026 17:40

Copilot AI 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.

Pull request overview

Fixes the Release workflow’s Docker publish job failure by ensuring the docker/metadata-action tags: YAML literal block contains only tag directives (no inline # ... text that would be passed through and break parsing), moving the explanatory notes to proper YAML comment lines above the block.

Changes:

  • Removed inline # ... suffixes from each tags: entry so docker/metadata-action@v6 receives clean tag directives.
  • Added an explicit warning comment explaining why inline # text must not appear inside the tags: | literal block, plus example tag formats.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

with:
images: ghcr.io/${{ github.repository }}
# Use the version from the semantic-release output
# Use the version from the semantic-release output.
# type=semver,pattern={{version}} e.g. 2.4.3
# type=semver,pattern=v{{major}}.{{minor}} e.g. v2.4
# type=semver,pattern=v{{major}} e.g. v2
# type=raw,value=latest,enable=true always tag latest on main branch release
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.

2 participants