feat(gitops): allow a different image path in the GitOps commit - #164
Draft
lucaghersi wants to merge 1 commit into
Draft
lucaghersi wants to merge 1 commit into
lucaghersi wants to merge 1 commit into
Conversation
Some registries separate where an image is pushed from where it is pulled. Google Artifact Registry is one: a push is accepted only into a standard repository, while a deployment should reference the virtual repository in front of it, so the upstream behind it can change without editing every manifest. gitops-docker-image writes that path to the GitOps repository. It defaults to docker-image, so an unset input leaves the commit byte for byte what it was. Only the GitOps commit is affected. The build, the push and the release retag keep using docker-image, because they act on the repository that stores the image. The scripts are untouched: update-gitops.sh already takes its image from the environment, so the choice is made where the step is wired. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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.
Type of Change
Description
Goal: let the image path written to the GitOps repository differ from the one pushed to.
Some registries separate publishing from consumption. Google Artifact Registry is one: a push is accepted only into a standard repository, while deployments should reference the virtual repository in front of it, so the upstream behind it can change without editing every manifest. Today both come from
docker-image, so a deployment ends up pinned to the publish repository.Merging this changes nothing for anyone.
gitops-docker-imagedefaults todocker-image, so every existing caller produces the same GitOps commit, byte for byte. Nothing else reads the new input.How to review
Two lines of behaviour:
action.yml— the new input, and one expression on the GitOps step:${{ inputs.gitops-docker-image || inputs.docker-image }}. Empty is falsy in a GitHub expression, so an unset input falls through to the old value.docker-image, because they act on the repository that actually stores the image.No script changes.
update-gitops.shalready takes its image from the environment, so the choice is made where the step is wired. The existing suite covers it unchanged: 109 tests pass,mise run lintclean.Checklist
🤖 Generated with Claude Code