From 6e26281fea14cf93fc1f48f894dfa5230e5241ca Mon Sep 17 00:00:00 2001 From: moilanik Date: Sun, 14 Jun 2026 08:56:54 +0300 Subject: [PATCH] fix: add missing GITEA_TOKEN auth to tags API call in check job --- .gitea/workflows/build_publish-artifact.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build_publish-artifact.yml b/.gitea/workflows/build_publish-artifact.yml index 54c3393..4471fc5 100644 --- a/.gitea/workflows/build_publish-artifact.yml +++ b/.gitea/workflows/build_publish-artifact.yml @@ -38,8 +38,9 @@ jobs: VERSION=$(jq -r '.version' package.json) echo "version=$VERSION" >> "$GITHUB_OUTPUT" - TAG=$(curl -s "$GITEA_API_URL/api/v1/repos/$GITHUB_REPOSITORY/tags" | \ - jq -r '.[] | select(.commit.sha == "'"$GITHUB_SHA"'") | .name' | head -1) + TAGS_JSON=$(curl -s -H "Authorization: token $GITEA_TOKEN" \ + "$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 echo "artifact_exists=true" >> "$GITHUB_OUTPUT" echo "Commit already tagged as $TAG, skipping build"