add check
This commit is contained in:
1 parent
467ae05eed
commit
b891f53568
1 file changed
+14
-14
@@ -39,21 +39,21 @@ jobs:
|
||||
echo "::set-output name=latest_tag::${LATEST_TAG}"
|
||||
echo "::set-output name=publish_date::${PUBLISH_DATE}"
|
||||
|
||||
# # 1. Check if the release already exists on Gitea
|
||||
# - name: Check if Release Exists
|
||||
# id: check_release
|
||||
# run: |
|
||||
# HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||
# -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||
# "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ steps.check_release.outputs.latest_tag }}")
|
||||
# 1. Check if the release already exists on Gitea
|
||||
- name: Check if Release Exists
|
||||
id: check_release
|
||||
run: |
|
||||
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ steps.check_release.outputs.latest_tag }}")
|
||||
|
||||
# if [ "$HTTP_STATUS" -eq 200 ]; then
|
||||
# echo "Release already exists. Skipping step."
|
||||
# echo "exists=true" >> "$GITHUB_OUTPUT"
|
||||
# else
|
||||
# echo "Release does not exist."
|
||||
# echo "exists=false" >> "$GITHUB_OUTPUT"
|
||||
# fi
|
||||
if [ "$HTTP_STATUS" -eq 200 ]; then
|
||||
echo "Release already exists. Skipping step."
|
||||
# echo "exists=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "Release does not exist."
|
||||
# echo "exists=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Download latest release
|
||||
run: |
|
||||
|
||||
Reference in new issue
Block a user