From 2a70359b0a136022cacbce846c374ed927e2c849 Mon Sep 17 00:00:00 2001 From: ZDDC Date: Sun, 3 May 2026 21:46:25 -0500 Subject: [PATCH] fix(ci): inline notify-chart-dev gate into bump step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two-step pattern was failing under Forgejo runner v12.9.0 — the gate step exited 141 immediately after echoing + writing GITHUB_OUTPUT, even with no pipelines involved. Folding the stable-tag check into the bump step's own strict-mode shell removes the cross-step boundary that the runner was tripping over. --- .forgejo/workflows/notify-chart-dev.yml | 29 ++++++++++--------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.forgejo/workflows/notify-chart-dev.yml b/.forgejo/workflows/notify-chart-dev.yml index 8398222..499ef83 100644 --- a/.forgejo/workflows/notify-chart-dev.yml +++ b/.forgejo/workflows/notify-chart-dev.yml @@ -39,28 +39,23 @@ jobs: with: fetch-depth: 0 - - name: Detect cut type (skip if HEAD has stable tag) - id: gate + - name: Auto-bump chart develop appVersion + push run: | set -eu - # 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. + + # Self-skip if HEAD has a stable tag — the prod workflow + # owns the chart bump in that case. Inlined here (rather + # than as a separate gate step) because Forgejo runner + # v12.9.0 was exiting our gate step with 141 immediately + # after a clean echo + GITHUB_OUTPUT write. Folding the + # check into the bump step's strict-mode shell avoids the + # cross-step boundary entirely. 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_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" + echo "HEAD has stable tag ($STABLE_TAGS) — stable workflow handles chart bump; skipping dev notify" + exit 0 fi - - - name: Auto-bump chart develop appVersion + push - if: steps.gate.outputs.is_beta == 'true' - run: | - set -eu + echo "No stable tag at HEAD; treating as beta cut" if [ -z "${CHART_FORGEJO_TOKEN:-}" ]; then echo "::error::CHART_FORGEJO_TOKEN secret not set on this repo" >&2