From 6402b01fd0f7ba1b08bd452073a7401add3b7e71 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Tue, 9 Jan 2024 18:44:00 +0100 Subject: [PATCH] chore: Create final docker image only on tag creation --- .github/workflows/docker-image.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 2486350..4182a52 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -1,7 +1,8 @@ name: Docker image on: push: - branches: [ "main" ] + tags: + - '*' pull_request: jobs: @@ -30,7 +31,7 @@ jobs: gradle-version: 8.5 cache-read-only: true - name: Create and publish docker image - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: github.event_name == 'push' run: ./gradlew -Prelease.useLastTag=true final jib env: USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}