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

Feature: Use the docker/metadata-action to set tags and labels for image #131

Merged

Conversation

stumpylog
Copy link
Contributor

This PR updates the workflows to use docker/metadata-action to set both image tags and labels.

For a PR, this sets a tag such as pr-1 and a bunch of useful labels

For a release, this does update slightly, to produce both a :latest, a :version and a :major.minor, which looks like this with basically the same labels

Some other updates:

  • This should allow forks to build and publish an image if they want
  • Instead of needing a Personal Access Token, ${{ secrets.GITHUB_TOKEN }} will have permissions already
  • Uses the ${{ github.actor }} instead of hard coding that, again for better fork support
  • Disabled example of pushing to Docker Hub

@jordan-dalby
Copy link
Owner

@stumpylog
Nice! Are you aware of a way we can get PRs pushing to the registry? I use them for testing on my server and for users trying out fixes.

@stumpylog
Copy link
Contributor Author

stumpylog commented Nov 25, 2024

Not a problem, that should do it. Don't want to interrupt your workflow.

Hmm, ok, give me a bit

@jordan-dalby
Copy link
Owner

Nice work!

@jordan-dalby jordan-dalby merged commit 8d6b054 into jordan-dalby:main Nov 25, 2024
1 check passed
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