Skip to content

Conversation

@jphastings
Copy link
Contributor

This PR adds a Github workflow that builds & publishes an OCI/Docker container image to Github's Container Registry (ghcr.io) alongside the executables currently built with Github actions. This PR also adds a brief intro for how to use it in the README, and removes the (now outdated) tools/docker/README.md.

You can see the build running on my own branch (under tag v3.3.8+docker). Try this container out with:

docker pull ghcr.io/jphastings/agate

(This would become ghcr.io/mbrubeck/agate on merge)

I've set up the docker labels so they derive from your git tags. You can select latest, major, minor, or patch versions for auto-update, as well as selecting a specific version too:

# Pulls the most recently released image
# These two are equivalent under most standard setups
docker pull ghcr.io/jphastings/agate
docker pull ghcr.io/jphastings/agate:latest

# Pulls the most recently deployed image within a major version of 3
docker pull ghcr.io/jphastings/agate:3

# Pulls the most recently deployed image within a major version of 3 and minor version of 3
docker pull ghcr.io/jphastings/agate:3.3

# Pulls the most recently deployed image within a major version of 3, minor 3, patch 8
docker pull ghcr.io/jphastings/agate:3.3.8

The specifics of how git tags are pulled into docker tags is detailed here; but the current Agate semver approach will translate well into docker tags without modification.

Do let me know if you have any questions!

Closes #279

This Github workflow builds & publishes an OCI/Docker container image to Github/s Container Registry (ghcr.io).

It also adds a brief intro for how to use it in the README, and removes the (now outdated) `tools/docker/README.md`.
Copy link
Owner

@mbrubeck mbrubeck left a comment

Choose a reason for hiding this comment

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

Thanks!

@mbrubeck mbrubeck merged commit 4682421 into mbrubeck:master Nov 29, 2024
3 checks 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.

Add ghcr.io Docker container generation to workflow actions

2 participants