This repository automatically tracks and builds container images using GitHub Actions. Images can be pushed to either GitHub Container Registry (GHCR) or Docker Hub.
By default, all images are pushed to GitHub Container Registry (ghcr.io). To push to Docker Hub instead, add an image section to your app's .ci/metadata.yaml file:
app: my-app
version: 1.0.0
builds:
- name: main
platforms:
- linux/amd64app: my-app
version: 1.0.0
# Push to Docker Hub instead of GHCR
image:
registry: docker.io
builds:
- name: main
platforms:
- linux/amd64- Uses the
GITHUB_TOKENautomatically provided by GitHub Actions - Images are pushed to
ghcr.io/OWNER/APP_NAME:TAG
- Requires a
DOCKER_HUB_TOKENsecret to be configured in the repository - Images are pushed to
OWNER/APP_NAME:TAG(Docker Hub format) - The Docker Hub username will be the same as the GitHub repository owner (converted to lowercase)
To use Docker Hub, you need to add a repository secret:
- Go to your repository's Settings → Secrets and variables → Actions
- Add a new repository secret named
DOCKER_HUB_TOKEN - Set the value to your Docker Hub access token
ghcr.io(GitHub Container Registry) - Defaultdocker.io(Docker Hub)
Both registries will receive two tags:
rolling- Latest build from the main branchVERSION- Specific version from the metadata.yaml file