fix(docker): Add image template var and strict template validation#713
Merged
fix(docker): Add image template var and strict template validation#713
Conversation
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛Docker
🤖 This preview updates automatically when you update the PR. |
- Add `{{{image}}}` template variable support for docker target formats
- Make renderTemplateSafe throw ConfigurationError on unknown variables
- Fix misleading 'no credentials' debug message when source/target share registry
- Update docs with format template variables and "latest" tag example
578065f to
2cab1e9
Compare
Contributor
|
betegon
approved these changes
Jan 13, 2026
This was referenced Jan 13, 2026
7 tasks
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
Fixes two issues when publishing Docker images and adds a third improvement for better error handling:
1. Fix misleading "No credentials" debug message
When source and target registries are the same (e.g., both
ghcr.io), the debug message "No credentials for source registry ghcr.io, assuming public" was shown even though credentials were available and login succeeded. Now we skip this message when the registries match since target login covers both.2. Add
{{{image}}}template variable supportUsers can now use
{{{image}}}in their format strings, which is more intuitive when defining formats inside source/target blocks:3. Strict template variable validation
renderTemplateSafenow throws aConfigurationErrorwith a helpful message when an unknown template variable is used, instead of silently rendering an empty string:This would have caught the original issue immediately rather than producing an invalid Docker reference like
:latest.