From 4a78ce4473c4eaacae7e5888e06c9e8703164f09 Mon Sep 17 00:00:00 2001 From: ZDDC Date: Sun, 3 May 2026 21:43:01 -0500 Subject: [PATCH] fix(ci): notify-chart-dev gate avoids SIGPIPE; add workflow_dispatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The gate step's `git tag --points-at HEAD | grep -q '^zddc-server-v'` exits 141 (SIGPIPE) under bash's pipefail when grep finishes early — the runner's strict-mode wrapper then fails the step even though the if-condition logic completed correctly. Materialize the tag list with git's native --list glob filter and test it with `[ -n ]` instead, so no pipeline is involved. Also add workflow_dispatch so we can re-fire this workflow on a fresh commit without needing a no-op edit under zddc/internal/apps/embedded/ to match the paths filter. --- .forgejo/workflows/notify-chart-dev.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/notify-chart-dev.yml b/.forgejo/workflows/notify-chart-dev.yml index 23f7409..8398222 100644 --- a/.forgejo/workflows/notify-chart-dev.yml +++ b/.forgejo/workflows/notify-chart-dev.yml @@ -18,6 +18,10 @@ on: branches: [main] paths: - 'zddc/internal/apps/embedded/**' + # Manual trigger — useful for re-firing after a workflow fix without + # also having to make a no-op embedded/ change to satisfy the paths + # filter. Run on the latest main commit; gate-step still applies. + workflow_dispatch: jobs: notify-chart-dev: @@ -39,9 +43,15 @@ jobs: id: gate run: | set -eu - if git tag --points-at HEAD | grep -q '^zddc-server-v'; then + # Avoid `git tag | grep -q ^zddc-server-v` — under bash's + # default `pipefail`, grep -q closing stdin early gives git + # SIGPIPE (exit 141), which the runner's strict-mode wrapper + # treats as a step failure even though the if-condition logic + # is correct. Materialize the tag list first, then test it. + STABLE_TAGS=$(git tag --points-at HEAD --list 'zddc-server-v*') + if [ -n "$STABLE_TAGS" ]; then echo "is_beta=false" >> "$GITHUB_OUTPUT" - echo "HEAD has zddc-server-v* tag — stable workflow handles this; skipping dev notify" + echo "HEAD has zddc-server-v* tag ($STABLE_TAGS) — stable workflow handles this; skipping dev notify" else echo "is_beta=true" >> "$GITHUB_OUTPUT" echo "No stable tag at HEAD; treating as beta cut"