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

Add option to enable/disable images #159

Closed
lucacome opened this issue Dec 30, 2021 · 4 comments · Fixed by #193
Closed

Add option to enable/disable images #159

lucacome opened this issue Dec 30, 2021 · 4 comments · Fixed by #193

Comments

@lucacome
Copy link

lucacome commented Dec 30, 2021

This is a feature request. Would it be possible to add options to images, similar to tags?

example:

images: |
	name=myapp/foo,enable=${{ startsWith(github.ref, 'refs/tags') }}
	name=other/registry,enable=${{ github.event_name == 'pull_request' }}

or even:

images: |
	name=myapp/foo,event=tag
	name=other/registry,event=pr

Thanks!

@crazy-max
Copy link
Member

crazy-max commented Dec 30, 2021

@lucacome Yes in the first version of this action the images were merged to the tags input but the config was too verbose. An enable type for images sgtm though.

Will think about a filter type for images where you could filter by event.

@Xerkus
Copy link

Xerkus commented Feb 5, 2022

Since this is GHA action, I think if for conditional expression would be more consistent: if=${{ startsWith(github.ref, 'refs/tags') }}

@crazy-max
Copy link
Member

@lucacome I have started smth in #193 if you want to take a look.

Can be tested with crazy-max/docker-metadata-action@images-opts. Docs: https://github.com/crazy-max/docker-metadata-action/tree/images-opts#images-input

@lucacome
Copy link
Author

I'll take a look, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants