diff --git a/.github/workflows/webhook.yml b/.github/workflows/webhook.yml index 607e6ee..92915f9 100644 --- a/.github/workflows/webhook.yml +++ b/.github/workflows/webhook.yml @@ -45,7 +45,6 @@ jobs: push: false release: - name: push image needs: test if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest @@ -62,25 +61,35 @@ jobs: - run: echo "VERSION=$(cat version.txt)" >> "$GITHUB_OUTPUT" id: version-selector name: generate image name - - run: "! docker manifest inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version-selector.outputs.VERSION }}" - name: confirm image is not already pushed - - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 - with: - context: ${{ env.WORKING_DIR }} - push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version-selector.outputs.VERSION }} - - uses: mathieudutour/github-tag-action@v6.1 - id: tag_version - with: - custom_tag: ${{ env.TAG_PREFIX }}:${{ steps.version-selector.outputs.VERSION }} - github_token: ${{ secrets.GITHUB_TOKEN }} - - uses: ncipollo/release-action@v1 - with: - tag: ${{ steps.tag_version.outputs.new_tag }} - name: Release ${{ steps.tag_version.outputs.new_tag }} - body: ${{ steps.tag_version.outputs.changelog }} + +# - run: "! docker manifest inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version-selector.outputs.VERSION }}" +# name: confirm image is not already pushed + + - run: | + TAG_NAME=$TAG_PREFIX:v${{ steps.version-selector.outputs.VERSION }} + git rev-parse -q --verify "refs/tags/$TAG_NAME" + name: confirm git tag does not exist + +# - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 +# with: +# registry: ${{ env.REGISTRY }} +# username: ${{ github.actor }} +# password: ${{ secrets.GITHUB_TOKEN }} +# +# - uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 +# with: +# context: ${{ env.WORKING_DIR }} +# push: true +# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version-selector.outputs.VERSION }} +# +# - uses: mathieudutour/github-tag-action@v6.1 +# id: tag_version +# with: +# custom_tag: ${{ env.TAG_PREFIX }}:${{ steps.version-selector.outputs.VERSION }} +# github_token: ${{ secrets.GITHUB_TOKEN }} +# +# - uses: ncipollo/release-action@v1 +# with: +# tag: ${{ steps.tag_version.outputs.new_tag }} +# name: Release ${{ steps.tag_version.outputs.new_tag }} +# body: ${{ steps.tag_version.outputs.changelog }}