fix(ci): use env var for API_BASE in RC release step
Branch Policy Check / Verify merge target (pull_request) Failing after 1s
PR RC Release / Build RC Release (pull_request) Successful in 19s

The Python heredoc couldn't access shell-local API variable.
Move it to step-level env so os.environ sees it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-05-24 23:59:15 -05:00
parent fa54fe1ffc
commit f09aadf60c
+4 -5
View File
@@ -115,20 +115,19 @@ jobs:
PR_URL: ${{ github.event.pull_request.html_url }}
PR_NUMBER: ${{ github.event.pull_request.number }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
API_BASE: https://${{ env.REGISTRY }}/api/v1/repos/${{ github.repository }}
run: |
API="https://${REGISTRY}/api/v1/repos/${{ github.repository }}"
# Delete existing RC release/tag if present
curl -s -X DELETE -H "Authorization: token ${GITEA_TOKEN}" \
"${API}/releases/tags/${RC_TAG}" 2>/dev/null || true
"${API_BASE}/releases/tags/${RC_TAG}" 2>/dev/null || true
curl -s -X DELETE -H "Authorization: token ${GITEA_TOKEN}" \
"${API}/tags/${RC_TAG}" 2>/dev/null || true
"${API_BASE}/tags/${RC_TAG}" 2>/dev/null || true
# Create prerelease
python3 << PYEOF
import json, os, urllib.request
api = os.environ["API"]
api = os.environ["API_BASE"]
token = os.environ["GITEA_TOKEN"]
payload = json.dumps({
"tag_name": os.environ["RC_TAG"],