From f09aadf60c7205efd927cca8de23ed166db80737 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sun, 24 May 2026 23:59:15 -0500 Subject: [PATCH] fix(ci): use env var for API_BASE in RC release step 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) --- .mokogitea/workflows/pr-rc-release.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.mokogitea/workflows/pr-rc-release.yml b/.mokogitea/workflows/pr-rc-release.yml index 41dfa01d04..300c4d42be 100644 --- a/.mokogitea/workflows/pr-rc-release.yml +++ b/.mokogitea/workflows/pr-rc-release.yml @@ -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"],