From 9d732c127c2141ee90b577dfb17db70cf122fdb4 Mon Sep 17 00:00:00 2001 From: Peter Van Bouwel Date: Tue, 19 Nov 2024 10:47:49 +0100 Subject: [PATCH] cicd: always publish container --- .github/workflows/container_build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/container_build.yml b/.github/workflows/container_build.yml index e814d45..796cfa4 100644 --- a/.github/workflows/container_build.yml +++ b/.github/workflows/container_build.yml @@ -8,6 +8,8 @@ on: push: tags: - v* + branches: + - "*" env: IMAGE_NAME: fakes3pp @@ -40,6 +42,8 @@ jobs: [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') # This uses the Docker `latest` tag convention. [ "$VERSION" == "main" ] && VERSION=latest + # Use commit hash if no other applicable tag + [ "$VERSION" != "latest" ] && [[ "${{ github.ref }}" != "refs/tags/"* ]] && VERSION="commit-$GITHUB_SHA" echo IMAGE_ID=$IMAGE_ID echo VERSION=$VERSION docker tag $IMAGE_NAME $IMAGE_ID:$VERSION