You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
github/forgejo Op generators emit set -o pipefail into a container job, whose default shell is sh, so live-apply and live-adopt cannot run #2299
A gated Op's generated job cannot start on GitHub Actions when the pipeline uses container:. The generator emits
set -o pipefail
json=...
npx chant run live-apply --gated-exit 0 --json | tee "$json"
node -e '...'
as the job's run: step, and declares no shell: and no defaults.run.shell. A container job's default shell on GitHub is sh, not bash, so the first line fails before chant is reached:
Observed on a real GitHub Actions run while standing up the first end-to-end execution of INTENTIUS/choudoufu's examples/ci-pipelines, run 34312967579. grep -rn 'shell:\|defaults:' across all ten generated GitHub and Forgejo workflows in that project returns nothing.
Why it went unnoticed
Nothing had ever executed these pipelines. Every guard on both sides proved what the YAML says. The first run that actually started a job found this in its first second.
Blast radius
Any consuming project whose Op pipeline sets container: and uses gated apply. In choudoufu's example that is live-apply and live-adopt, the two Ops that change infrastructure, on both GitHub and Forgejo, since the Forgejo dialect inherits the same step. live-check, live-plan and live-discover have no pipefail line and are unaffected.
Do
Declare the shell the emitted script needs. Either shell: bash on the step that uses pipefail, or defaults: { run: { shell: bash } } on the generated workflow, or emit a script that is POSIX-clean and needs neither. Whichever is chosen, the generator should not be able to emit set -o pipefail without something guaranteeing bash.
Forgejo Actions uses the same runner semantics; fix both dialects together.
Proof
A generated workflow for a project with container: and a gated Op, asserted in the lexicon's tests to carry the shell declaration, shown red without it. Then one real run of that job reaching chant rather than dying on line 1.
Activity
docs(terraform,github): resync shipped samples with #2299/#2302/#2305 (…
test(terraform): pin the POSIX status capture, not the pipefail line …
fix(op): a gated push job exit-code capture is POSIX sh, not bash (#2321
docs(op): clear the prose-lint regressions in the plan-digest pages
feat(op): a gate approves a plan, not the next run (#2300) (#2338)
test(terraform): tie the ops page's YAML sample to the generator (#2331…