File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed
Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -38,20 +38,19 @@ jobs:
3838 if : github.event_name == 'pull_request'
3939 run : echo "SNAPSHOT_SUFFIX=-pr-${{ github.event.number }}" >> $GITHUB_ENV
4040
41- # todo: this is temporary, should be restored
42- # - name: Check for existing release tag (only on PR)
43- # if: github.event_name == 'pull_request'
44- # env:
45- # VERSION: ${{ env.VERSION }}
46- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47- # run: |
48- # TAG_EXISTS=$(curl -H "Authorization: token $GITHUB_TOKEN" -s https://api.github.com/repos/${{ github.repository }}/releases | jq -r ".[] | select(.tag_name == \"v$VERSION\") | .tag_name")
49- # if [ "$TAG_EXISTS" == "v$VERSION" ]; then
50- # echo "Release tag v$VERSION already exists. Rejecting PR."
51- # exit 1
52- # else
53- # echo "No existing release with tag v$VERSION found. Proceeding with build."
54- # fi
41+ - name : Check for existing release tag (only on PR)
42+ if : github.event_name == 'pull_request'
43+ env :
44+ VERSION : ${{ env.VERSION }}
45+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46+ run : |
47+ TAG_EXISTS=$(curl -H "Authorization: token $GITHUB_TOKEN" -s https://api.github.com/repos/${{ github.repository }}/releases | jq -r ".[] | select(.tag_name == \"v$VERSION\") | .tag_name")
48+ if [ "$TAG_EXISTS" == "v$VERSION" ]; then
49+ echo "Release tag v$VERSION already exists. Rejecting PR."
50+ exit 1
51+ else
52+ echo "No existing release with tag v$VERSION found. Proceeding with build."
53+ fi
5554
5655 # Logins
5756 - name : Login to Docker Hub
You can’t perform that action at this time.
0 commit comments