From 841d3ac115a6aed87fff6c380fbaea869b0ab48c Mon Sep 17 00:00:00 2001 From: Kovah Date: Thu, 5 May 2022 20:38:46 +0200 Subject: [PATCH] Fix tag handling for standard and alpine image --- .github/workflows/build.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b2640d..5b2e74a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,21 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=sha + - name: Docker meta for Alpine image + id: alpine-meta + uses: docker/metadata-action@v4 + with: + images: | + actualbudget/actual-server + ghcr.io/actualbudget/actual-server + tags: | + type=ref,event=branch + type=ref,event=pr + type=raw,value=latest,suffix=-alpine + type=semver,pattern={{version}},suffix=-alpine + type=semver,pattern={{major}}.{{minor}},suffix=-alpine + type=sha,suffix=-alpine + - name: Login to Docker Hub uses: docker/login-action@v1 with: @@ -58,7 +73,7 @@ jobs: context: . push: true platforms: linux/amd64,linux/arm64 - tags: ${{ secrets.DOCKERHUB_PROJECT }}:latest + tags: ${{ steps.meta.outputs.tags }} - name: Build and push Alpine image uses: docker/build-push-action@v2 @@ -67,4 +82,4 @@ jobs: push: true file: Dockerfile.alpine platforms: linux/amd64,linux/arm64 - tags: ${{ steps.meta.outputs.tags }} + tags: ${{ steps.alpine-meta.outputs.tags }}