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"