Github workflow to build and push Docker images on tag #1752
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a
Dockerfile
is successfully merged (hopefully PR #1751), we can automate the build and push of the Docker image to Docker Hub.This PR adds a GitHub workflow to automatically build
amd64
andarm64
Docker images and push them to the Docker registry (with a tag, and to also push/update thelatest
image tag).This PR is largely based on this: https://github.com/getumbrel/umbrel-manager/blob/fc823490591ea55e26734d144a0527fe9618166d/.github/workflows/on-tag.yml
You need to create the necessary Github secrets (for the Docker registry credentials): https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository
These need to be created:
DOCKER_USERNAME
DOCKER_PASSWORD
DOCKER_HUB_USER
You can create a tag easily by following these instructions: https://stackoverflow.com/a/18223354
The workflow is setup to look for tags using semver. versioning which looks inline with the existing tags: https://github.com/casey/ord/tags