-
Notifications
You must be signed in to change notification settings - Fork 118
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
Feature: Add 'tag' input to allow creating tags based on upstream versions #18
Comments
Even though I wrote #15, I ended up not using this action because of the exact same reason you mention. I was thinking about implementing this as well :P I wasn't sure which name I'd give the input. For my use case, I was thinking of adding |
@hugopeixoto @LongLiveCHIEF Yeah that LGTM! Feel free to open a PR. I will soon merge #15 ;) |
The other thing I'm thinking is that since this introduces the concept of external events, we could have a problem with From reading docs, it seems that currently With this scenario, where you supply the tag instead of getting it from an event, we'll need to make sure the user has the ability to disable
I think it's better to use a singular string type input here rather than a list, as the recommendation would be to use a matrix to supply multiple input tags, since it's very likely each input tag has different build conditions. For example let's say you supplied a an emergency security patch, which might be a scenario where you would build multiple major versions:
Now, when you get to building the image, both of those would generate the respective list of tags, but would be passed to the same However, using a matrix:
This will allow the build and subsequent tests to pass/fail on their own merits for each major tag. Then again, I guess we could support a csv/list and then the user can decide when it's better to use a matrix with a single-value-list vs a list of input-tags. ok yeah.... disregard everything I just said... i'm going with that. |
Why not a list then? If you only want tag then put one tag, if someone else want more tags let's do that. I don't see any blocking case about a list.
Maybe in your case but let say a user want |
@LongLiveCHIEF Sorry didn't see the end of your post ahah |
@crazy-max I think you missed the last 2 lines of my comment 🤣 @hugopeixoto the action I wrote supports both variants and upstream triggers, but the downside is that it was designed to be used by a matrix, because i didn't know buildx could support multiple tags at the time. Depending on your needs, you might be able to use that action until I get this feature added here. |
Standard docker build support multi tags too. Do you have a link to a workflow? |
https://github.com/OctoPrint/octoprint-docker/blob/master/.github/workflows/octoprint-release.yml That's what I'm doing currently, and it was built before the Earlier today i started migrating to the new docker actions, which should improve that workflow quite a bit if I can get this feature added over the next few days. |
...and here is the work in progress so far: https://github.com/OctoPrint/octoprint-docker/blob/update-usage-set-env-in-workflows/.github/workflows/octoprint-release.yml Note: it's broken because I'm not done and there are places where the refactor is only half done, but you can kinda see where I'm going with it. |
Argh that's what I thought, your tags are tampered (different digest for each because it's a whole new build through your matrix strategy): So the following tags are not linked between each other by their manifest. You should only have one digest between them like this: In your case each image for each tag is written to disk on the registry. To demonstrate this behavior you can pull |
well yeah, that's why i'm doing what I'm doing. 😃 |
And by that I mean migrating to use multiple tags in a single build. |
Oh ok that's a limitation of your action, got it! |
I have started to work on this, but will probably wait to see how the discussion in #19 pans out before submitting a PR, since if we decide that change would be better, then it would be much easier to write this feature after that change is made. |
@hugopeixoto while we're finishing discussions here, I've created a pre-release version of my tagging-strategy action that supports multiple tag outputs and should do everything you want. https://github.com/marketplace/actions/tagging-strategy?version=2.0.0-rc2 |
I maintain several repositories where the docker repo is separate from the application repo. I wrote an action a while back HackerHappyHour/tagging-strategy that had a lot of the same intentions of this action, and I'd like to archive it in favor of this action.
The only feature my action has that isn't yet implemented here is the ability to (optionally) supply a tag value, instead of getting the tag from the repository.
This allows upstream repo's to dispatch on tagging/releases, and and for the docker repo to build/publish tags when that happens.
Example where we do this: github.com/OctoPrint/Octoprint triggers github.com/OctoPrint/octoprint-docker.
This goes especially well with #15, which was the other feature missing from this action, but seems like @hugopeixoto beat me to it!
I'd be willing to contribute this feature, just need approved suggestion on the input name. I'm thinking:
Then for docs adding a 4th column in the inputs table in the README, specifying if
compatible with input_tag
, along with notes likeThe text was updated successfully, but these errors were encountered: