From af148bf1c470000754ad1a59297c35409dbd1210 Mon Sep 17 00:00:00 2001 From: cubicroot Date: Sat, 3 Aug 2024 13:56:05 +0200 Subject: [PATCH] push on every tag created --- .github/workflows/build_image.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_image.yaml b/.github/workflows/build_image.yaml index a33a64b..fb4382b 100644 --- a/.github/workflows/build_image.yaml +++ b/.github/workflows/build_image.yaml @@ -32,8 +32,8 @@ jobs: password: ${{ secrets.dockerhub_token }} - name: Push image with commit SHA run: docker push ${{ inputs.image_name }}:${{ github.sha }} - - name: Push image with release tag - if: "github.event_name == 'release' && github.event.action == 'created'" - run: docker tag ${{ inputs.image_name }}:${{ github.sha }} ${{ inputs.image_name }}:${{ github.event.release.tag_name }} && \ - docker push ${{ inputs.image_name }}:${{ github.event.release.tag_name }} + - name: Push image with tag + if: "startsWith(github.ref, 'refs/tags/')" + run: docker tag ${{ inputs.image_name }}:${{ github.sha }} ${{ inputs.image_name }}:$${{ github.ref_name }} && \ + docker push ${{ inputs.image_name }}:${{ github.ref_name }} \ No newline at end of file