Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,19 @@ jobs:
if: github.event_name == 'pull_request'
run: echo "SNAPSHOT_SUFFIX=-pr-${{ github.event.number }}" >> $GITHUB_ENV

# todo: this is temporary, should be restored
# - name: Check for existing release tag (only on PR)
# if: github.event_name == 'pull_request'
# env:
# VERSION: ${{ env.VERSION }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# 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")
# if [ "$TAG_EXISTS" == "v$VERSION" ]; then
# echo "Release tag v$VERSION already exists. Rejecting PR."
# exit 1
# else
# echo "No existing release with tag v$VERSION found. Proceeding with build."
# fi
- name: Check for existing release tag (only on PR)
if: github.event_name == 'pull_request'
env:
VERSION: ${{ env.VERSION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
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")
if [ "$TAG_EXISTS" == "v$VERSION" ]; then
echo "Release tag v$VERSION already exists. Rejecting PR."
exit 1
else
echo "No existing release with tag v$VERSION found. Proceeding with build."
fi

# Logins
- name: Login to Docker Hub
Expand Down
Loading