fix(ci): inline notify-chart-dev gate into bump step
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.
This commit is contained in:
parent
4a78ce4473
commit
2a70359b0a
1 changed files with 12 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue