diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0d5792e..83b119dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,7 @@ jobs: context: ./backend/mockingbird-api/target/docker/stage push: true tags: ghcr.io/tinkoff/mockingbird:${{ github.sha }} - if: ${{ !startsWith(github.ref, 'refs/tags/') }} + if: ${{ github.ref_type == 'branch' }} - name: Build and push docker image (release) uses: docker/build-push-action@v3 @@ -90,7 +90,7 @@ jobs: context: ./backend/mockingbird-api/target/docker/stage push: true tags: ghcr.io/tinkoff/mockingbird:${{ github.ref_name }} - if: ${{ startsWith(github.ref, 'refs/tags/') }} + if: ${{ github.ref_type == 'tag' }} back-build-native: needs: [front-build] @@ -132,7 +132,7 @@ jobs: context: ./backend/mockingbird-native/target/docker/stage push: true tags: ghcr.io/tinkoff/mockingbird:${{ github.sha }}-native - if: ${{ !startsWith(github.ref, 'refs/tags/') }} + if: ${{ github.ref_type == 'branch' }} - name: Build and push docker image (release) uses: docker/build-push-action@v3 @@ -140,4 +140,4 @@ jobs: context: ./backend/mockingbird-native/target/docker/stage push: true tags: ghcr.io/tinkoff/mockingbird:${{ github.ref_name }}-native - if: ${{ startsWith(github.ref, 'refs/tags/') }} \ No newline at end of file + if: ${{ github.ref_type == 'tag' }} \ No newline at end of file