Comments (16)
@LongLiveCHIEF Sorry didn't see the end of your post ahah
from metadata-action.
well yeah, that's why i'm doing what I'm doing. 😃
Oh ok that's a limitation of your action, got it!
from metadata-action.
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
This is the github action where I was planning on using it: https://github.com/hedgedoc/container/blob/master/.github/workflows/release.yml
I wasn't sure which name I'd give the input. For my use case, I was thinking of adding version
, but maybe git_tag
would be a good name? It clears up the ambiguity between docker tags and git tags.
from metadata-action.
@hugopeixoto @LongLiveCHIEF Yeah that LGTM! Feel free to open a PR. I will soon merge #15 ;)
About the input name I would prefer something more conform with the current inputs implemented like tags-input
that could be the same type as images
.
from metadata-action.
The other thing I'm thinking is that since this introduces the concept of external events, we could have a problem with latest
tag.
From reading docs, it seems that currently latest
tag is implicitly generated when a push
or push tag
event occurs, or if you have supplied a tag-match
.
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 latest
from being generated while still using tag-semver
.
About the input name I would prefer something more conform with the current inputs implemented like tags-input that could be the same type as images.
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:
tags-input: 2.1.1,3.0.1
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 build
command... which isn't usually what you want since major versions are often passed different build contexts.
However, using a matrix:
job:
release:
strategy:
matrix:
input-tags: ['2.1.1', '3.0.1'
steps:
-
uses: docker-meta
with:
tag-input: ${{ matrix.input-tags }}
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.
from metadata-action.
I think it's better to use a singular string type input here rather than a list
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.
since it's very likely each input tag has different build conditions.
Maybe in your case but let say a user want 2.1.1,2.1
that looks quiet reasonable to me.
from metadata-action.
@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.
from metadata-action.
didn't know buildx could support multiple tags at the time.
Standard docker build support multi tags too. Do you have a link to a workflow?
from metadata-action.
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 docker
official actions were supported. It used your buildx action and my aforementioned tagging-strategy action.
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.
from metadata-action.
...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.
from metadata-action.
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 octoprint/octoprint:1.5.0
and octoprint/octoprint:1.5
and it will download the image twice. You're lucky Docker doesn't have a size limit retention on their registry ahah. I strongly suggest to change this on your repo. This will be more effective for the end user.
from metadata-action.
well yeah, that's why i'm doing what I'm doing. 😃
from metadata-action.
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.
from metadata-action.
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.
from metadata-action.
@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
from metadata-action.
from metadata-action.
Related Issues (20)
- Unable to verify the first certificate HOT 4
- latest tag README instructions cause errors HOT 4
- Unexpected tag is created for type=match HOT 1
- `latest` tag in auto-mode is applied to older major versions HOT 2
- Feature request and discussion: support of annotations HOT 4
- Metadata action does not properly distinguish bake matrix targets HOT 1
- IP address is not permitted to access this resource HOT 3
- Disable `main` tag when `latest` is enabled HOT 2
- Secrets exposed in some action output HOT 1
- org.opencontainers.image.source is missing from the annotations section of the manifests HOT 2
- Custom annotations HOT 1
- Action fails: Cannot find detached HEAD ref in "grafted, HEAD, tag: x.x.x" HOT 10
- Warning: No Docker image version has been generated. Check tags input. HOT 1
- Missing latest tag on type=match HOT 1
- Images cannot be empty as documentation suggests HOT 1
- v5.5.0 Broke docker/bake-action with docker-metadata-action HOT 4
- #370 breaks GitHub Actions build example HOT 3
- semver tag : allow outputing build information (part after plus) HOT 4
- Generating tags for multiple bake targets HOT 3
- `SOURCE_DATE_EPOCH` is not respected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metadata-action.