From a83a127e312734a6eab984266ad5874f1917d1fd Mon Sep 17 00:00:00 2001 From: Caleb Allen Date: Tue, 18 Aug 2026 18:54:39 -0400 Subject: [PATCH] fix(ci): run the unclaim step under bash The workflow shipped in #103 and failed on every close, on its second line, before reaching the API: shell: sh -e {0} /var/run/act/workflow/0.sh: 2: set: Illegal option -o pipefail Inside `container:` the act runner selects sh, not bash, and `set -o pipefail` is a bashism. homebrew-formula.yml carries the same line without trouble because it runs with no container, on the host image where bash is the default -- so "another workflow does it" was not the evidence it looked like, and the comment now says so where the next person will read it. pipefail is kept rather than dropped for POSIX's sake: the lookup is `curl -sSf ... | jq`, so without it an API error yields empty output, an empty label id, and a cheerful "nothing to do" on every close. A silent no-op is the one outcome worse than a failing job here. Validated end to end against scratch issues rather than by reading it: with the label present the step returns 204 and the label is gone, and against an issue that never carried it the step also returns 204 and exits 0 -- which is what makes it safe to run on every close rather than only claimed ones. Still untested: whether secrets.GITEA_TOKEN carries issue-write scope. The old run never got far enough to find out. If it 403s, the fix is one line -- secrets.PACKAGE_TOKEN, which is a user PAT. Closes #102 --- .gitea/workflows/unclaim.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/unclaim.yml b/.gitea/workflows/unclaim.yml index ea29eef..23e9509 100644 --- a/.gitea/workflows/unclaim.yml +++ b/.gitea/workflows/unclaim.yml @@ -42,6 +42,13 @@ jobs: steps: - name: Drop the claim label + # **Inside a container the act runner selects `sh`, not bash**, so + # `set -o pipefail` fails the job on its second line with "Illegal + # option" and the step never reaches the API. `homebrew-formula.yml` + # carries the same `set -euo pipefail` without trouble because it + # runs with **no container**, on the host image where bash is the + # default — so "another workflow does it" is not evidence here. + shell: bash env: # The automatic Actions token, as release.yml uses for the # floor tag. It needs no more than write access to this repo. -- 2.54.0