Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(filter): handle 'tag only' fields #53

Merged
merged 2 commits into from
May 18, 2024

Conversation

rossigee
Copy link
Contributor

@rossigee rossigee commented Apr 28, 2024

Add ability to update fields that contain only an image tag, not a full image ref.

#19

@bluebrown
Copy link
Owner

bluebrown commented May 3, 2024

Ah my man. This is exactly how I imagined it, a while back. With the new part and context fields.

@rossigee rossigee marked this pull request as ready for review May 11, 2024 10:55
@rossigee
Copy link
Contributor Author

Tested and working locally. Ready for wider review.

@rossigee rossigee changed the title Handle 'tag only' fields feat(filter): handle 'tag only' fields May 12, 2024
@@ -40,6 +44,9 @@ func DefaultNodeHandler(_, currentRef, nextRef string, opts Options) (string, er
return currentRef, err
}

if opts.Part == "tag" {
Copy link
Owner

Choose a reason for hiding this comment

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

I am not sure how to handle the tag in this situation.

One way could be to have the digest as a seperate part to select from. Then we also need a way to combine parts into a single output field.

Or everything after the image is considered the tag or identifier how the container package calls it.

On top of that, the built in decoder actuall generate <tag>@<digest> identifiers. This is technically not correct. Registiries will ignore the tag but its nice for informational purposes.

@bluebrown
Copy link
Owner

I will merge this now. I think it can be as is, and I will add other parts called digest and identifier or something. Its actually already all there, I just need to switch on opts.part.

@bluebrown
Copy link
Owner

thanks for the work :)

@bluebrown bluebrown merged commit 7ae586e into bluebrown:main May 18, 2024
1 check passed
@rossigee rossigee deleted the tag-only-updates branch October 8, 2024 03:52
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