File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,17 +154,17 @@ jobs:
154154 echo "Tagging $repo@$VERSION (from $branch)"
155155 sha=$(git ls-remote "https://github.com/$repo.git" "refs/heads/$branch" | awk '{print $1}')
156156 if [ -n "$sha" ]; then
157- # Create lightweight tags: POST to /git/refs/{ref} with sha body
158- # Handle 422 (already exists) gracefully by checking if tag exists
157+ # Create lightweight tag using PAT (GITHUB_TOKEN is scoped to devstack only)
159158 if gh api "repos/$repo/git/refs/refs/tags/$VERSION" \
160159 --method POST \
161160 -f sha="$sha" \
161+ --header "Authorization: token $LOCALPIBOX_PAT" \
162162 2>/dev/null; then
163163 echo " ✅ $repo@$VERSION"
164- elif gh api "repos/$repo/git/ref/tags/$VERSION" 2>/dev/null > /dev/null; then
164+ elif gh api "repos/$repo/git/ref/tags/$VERSION" --header "Authorization: token $LOCALPIBOX_PAT" 2>/dev/null > /dev/null; then
165165 echo " ✅ $repo@$VERSION (already exists)"
166166 else
167- echo " ⚠️ $repo tag creation failed (tag doesn't exist) "
167+ echo " ⚠️ $repo tag creation failed"
168168 fi
169169 else
170170 echo " ⚠️ $repo:$branch not found, skipping tag"
You can’t perform that action at this time.
0 commit comments