From 90829f674329a42b937f95c04bee509f313e7574 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sun, 20 Jul 2025 16:41:47 +0100 Subject: [PATCH] Add workflow to build Docker containers --- .github/renovate.json | 6 ++++ .github/workflows/build-docker-image.yaml | 34 +++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/renovate.json create mode 100644 .github/workflows/build-docker-image.yaml diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..928b78a --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "config:base", + "github>nikdoof/renovate-config:python" + ] +} \ No newline at end of file diff --git a/.github/workflows/build-docker-image.yaml b/.github/workflows/build-docker-image.yaml new file mode 100644 index 0000000..9425aff --- /dev/null +++ b/.github/workflows/build-docker-image.yaml @@ -0,0 +1,34 @@ +name: docker-build + +on: + push: + branches: + - "master" + tags: + - "[0-9]+.[0-9]+.[0-9]+" + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GHCR + uses: docker/login-action@v3 + if: github.event_name != 'pull_request' + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + id: docker_build + uses: docker/build-push-action@v6 + with: + push: true + platforms: linux/amd64,linux/arm64 + tags: | + ghcr.io/${{ github.repository }}:${{ github.sha }} + ghcr.io/${{ github.repository }}:${{ github.ref_name }} + ghcr.io/${{ github.repository }}:latest