Revert "fix: replace Python heredoc with shell+jq in publish.yml"

This reverts commit 9dbe10cbe7.
This commit is contained in:
Codex
2025-12-23 08:54:40 +01:00
committed by github-actions[bot]
parent 528da937d0
commit 7b7356e019

View File

@@ -32,14 +32,21 @@ jobs:
- name: Check if build already published
id: cdn-check
run: |
SHA=$(echo "$GITHUB_SHA" | tr '[:upper:]' '[:lower:]')
if curl -sSf "$CDN_MANIFEST_URL" | jq -e ".builds[\"$SHA\"]" > /dev/null 2>&1; then
echo "Build $SHA already present on CDN; skipping."
echo "skip=true" >> "$GITHUB_OUTPUT"
else
echo "Build $SHA not found on CDN; continuing."
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
set -euo pipefail
python3 - <<'PY'
import json, os, urllib.request, sys
url = os.environ["CDN_MANIFEST_URL"]
sha = os.environ["GITHUB_SHA"].lower()
with urllib.request.urlopen(url) as resp:
manifest = json.load(resp)
exists = sha in manifest.get("builds", {})
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as f:
f.write(f"skip={'true' if exists else 'false'}\n")
if exists:
print(f"Build {sha} already present on CDN; skipping packaging.")
else:
print(f"Build {sha} not found on CDN; continuing.")
PY
- name: Cache NuGet packages
uses: actions/cache@v4