Skip to content

Build and push images on each push to main #1

Build and push images on each push to main

Build and push images on each push to main #1

Workflow file for this run

name: build-docker
on:
push:
branches:
- 'main'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Useful variables
id: setvars
# ghcr.io namespaces must be lower case, but there's no native way
# in the GitHub Actions expression language to convert string case,
# so we have to do it ourselves in a script.
run: echo "repoowner=${{ github.repository_owner }}" | tr 'A-Z' 'a-z' >> "$GITHUB_OUTPUT"
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
-
name: Build
uses: docker/bake-action@v6
env:
PROD: "true"
DBBR_REGISTRY: ghcr.io/${{ steps.setvars.outputs.repoowner }}/
with:
files: |
./docker-bake.hcl
cwd://${{ steps.meta.outputs.bake-file-labels }}
push: true