fix(ci/winget): envs: must live under with:, not as a step sibling

24d2f97e added envs: GITHUB_REF_NAME to fix "Verify the served
catalogue" failing on every tag with `GITHUB_REF_NAME: unbound
variable` — but placed it as a sibling of with:/env: on the step,
which is not part of the step schema and is silently ignored by
Gitea's runner. appleboy/ssh-action never received it as an input,
so the step kept failing identically on v0.20.1's first tag run.

docker.yml and deploy-services.yml already forward REGISTRY_TOKEN
this way correctly: envs: nested inside with:. Moved to match.
Confirmed by parsing the workflow and checking envs lands in the
step's with: dict, not as a bare step key.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-28 00:01:45 +02:00
co-authored by Claude Sonnet 5
parent 8fe71be424
commit 74179c4c2e
+8 -6
View File
@@ -436,11 +436,13 @@ jobs:
| grep -q "${GITHUB_REF_NAME#v}" \ | grep -q "${GITHUB_REF_NAME#v}" \
|| { echo "served catalogue does not contain ${GITHUB_REF_NAME#v}"; exit 1; } || { echo "served catalogue does not contain ${GITHUB_REF_NAME#v}"; exit 1; }
echo "winget source serving ${GITHUB_REF_NAME#v}" echo "winget source serving ${GITHUB_REF_NAME#v}"
# `env:` below populates the RUNNER's environment; this action runs `script` on the
# REMOTE host, which inherits nothing from it. `envs:` is the action's OWN input —
# it must live under `with:` (matching docker.yml/deploy-services.yml's REGISTRY_TOKEN
# forwarding) — naming the variables to forward into the remote shell. A prior fix put
# it as a step-level sibling of `with:`/`env:` instead: that key is not part of the
# step schema, so appleboy/ssh-action never received it as an input and the step kept
# failing ("GITHUB_REF_NAME: unbound variable") on every tag after 24d2f97e too.
envs: GITHUB_REF_NAME
env: env:
GITHUB_REF_NAME: ${{ gitea.ref_name }} GITHUB_REF_NAME: ${{ gitea.ref_name }}
# `env:` populates the RUNNER's environment; this action runs `script` on the REMOTE
# host, which inherits nothing from it. `envs:` is the action's own allow-list of names
# to forward into the remote shell — without it `set -u` aborted at the first expansion
# ("GITHUB_REF_NAME: unbound variable") and the step failed on every tag, after the
# catalogue had already shipped correctly.
envs: GITHUB_REF_NAME