fix: v0.5.44 — Docker license-label fix from v0.5.43 didn't reach the published image - #65
Merged
Merged
Conversation
… published image docker/metadata-action auto-generates org.opencontainers.image.licenses (defaulted to "NOASSERTION" since it can't detect an SPDX license from the GitHub API), and docker-publish.yml passed that full label set into build-push-action, whose labels override same-key LABELs declared in the Dockerfile. The real ghcr.io/soundmatt/c-fusa:0.5.43 image therefore still shipped licenses=NOASSERTION, silently undoing the v0.5.43 Dockerfile fix (issue #62 item 1) at the point it actually mattered — the published image. Fix: pass org.opencontainers.image.licenses=MPL-2.0 as a custom label to docker/metadata-action itself (documented to override its own auto-generated value), so the override happens before the label set ever reaches build-push-action. Caught by inspecting the v0.5.43 Docker Publish workflow's build logs after tagging, rather than assuming the Dockerfile-level fix was sufficient. Verification: clean cmake configure + build + ctest — all 38 suites pass, 0 regressions (this fix only touches docker-publish.yml/version.h). Signed-off-by: SoundMatt <SoundMatt@users.noreply.github.com> Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #64/v0.5.43. While verifying the v0.5.43 release, I inspected the actual
ghcr.io/soundmatt/c-fusa:0.5.43image's Docker Publish workflow logs and foundorg.opencontainers.image.licenses=NOASSERTION— the Dockerfile-level MIT→MPL-2.0 fix from #62 item 1 (the highest-priority fix in that issue) never reached the published image.Root cause:
docker/metadata-actionauto-generates a set of OCI labels, includingorg.opencontainers.image.licenses(defaulted toNOASSERTIONsince it can't detect an SPDX license via the GitHub API).docker-publish.ymlpasses that full label set tobuild-push-action, and labels supplied that way override same-keyLABELinstructions in the Dockerfile. So despite the Dockerfile correctly declaringMPL-2.0, the published image still shipped the wrong value.Fix: pass
org.opencontainers.image.licenses: MPL-2.0as a custom label directly todocker/metadata-action(documented behavior: custom labels with a matching key override the action's own auto-generated ones), so the correct value is baked intosteps.meta.outputs.labelsbefore it ever reachesbuild-push-action.Test plan
cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build --parallel— succeedsctest --output-on-failure— 100% passed, 0 tests failed out of 38 (no regressions; this change only touchesdocker-publish.yml/version.h)v0.5.44, will re-verify the published image'sorg.opencontainers.image.licenseslabel via the Docker Publish workflow logs to confirm it now readsMPL-2.0