fix: add missing GITEA_TOKEN auth to tags API call in check job
This commit is contained in:
@@ -38,8 +38,9 @@ jobs:
|
|||||||
VERSION=$(jq -r '.version' package.json)
|
VERSION=$(jq -r '.version' package.json)
|
||||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
TAG=$(curl -s "$GITEA_API_URL/api/v1/repos/$GITHUB_REPOSITORY/tags" | \
|
TAGS_JSON=$(curl -s -H "Authorization: token $GITEA_TOKEN" \
|
||||||
jq -r '.[] | select(.commit.sha == "'"$GITHUB_SHA"'") | .name' | head -1)
|
"$GITEA_API_URL/api/v1/repos/$GITHUB_REPOSITORY/tags")
|
||||||
|
TAG=$(echo "$TAGS_JSON" | jq -r 'if type == "array" then .[] | select(.commit.sha == "'"$GITHUB_SHA"'") | .name else empty end' | head -1)
|
||||||
if [ -n "$TAG" ]; then
|
if [ -n "$TAG" ]; then
|
||||||
echo "artifact_exists=true" >> "$GITHUB_OUTPUT"
|
echo "artifact_exists=true" >> "$GITHUB_OUTPUT"
|
||||||
echo "Commit already tagged as $TAG, skipping build"
|
echo "Commit already tagged as $TAG, skipping build"
|
||||||
|
|||||||
Reference in New Issue
Block a user