From 6c4925c3510a3dee6fba5290a0d5e71c486ae6e5 Mon Sep 17 00:00:00 2001 From: squat Date: Mon, 23 Mar 2026 16:07:22 +0100 Subject: [PATCH] feat(CI): enable tagging containers with Git tags --- .github/workflows/ci.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 841f7dc..441454f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,8 @@ name: CI on: push: branches: [main] + tags: + - "*" pull_request: schedule: - cron: "0 0 * * *" @@ -34,22 +36,15 @@ jobs: - uses: actions/checkout@v6 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v6 - with: - images: ghcr.io/${{ env.IMAGE_NAME }},docker.io/${{ env.IMAGE_NAME }} - tags: type=sha,prefix= - flavor: latest=true - name: Build uses: docker/build-push-action@v7 with: context: . platforms: linux/amd64, linux/arm64, linux/arm - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + build-args: | + VERSION=${{ github.sha }} test: runs-on: ubuntu-latest @@ -98,7 +93,10 @@ jobs: uses: docker/metadata-action@v6 with: images: ghcr.io/${{ env.IMAGE_NAME }},docker.io/${{ env.IMAGE_NAME }} - tags: type=sha,prefix= + tags: | + type=sha,prefix= + type=ref,event=tag + type=raw,value=latest,enable={{is_default_branch}} flavor: latest=true - name: Build and push id: push