From 74179c4c2e7f87b97b37229f4bfe5e8199099080 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Mon, 27 Jul 2026 22:07:39 +0200 Subject: [PATCH] fix(ci/winget): envs: must live under with:, not as a step sibling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .gitea/workflows/windows-host.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/windows-host.yml b/.gitea/workflows/windows-host.yml index 7e4be0b0..12eedf58 100644 --- a/.gitea/workflows/windows-host.yml +++ b/.gitea/workflows/windows-host.yml @@ -436,11 +436,13 @@ jobs: | grep -q "${GITHUB_REF_NAME#v}" \ || { echo "served catalogue does not contain ${GITHUB_REF_NAME#v}"; exit 1; } 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: 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