Conversation
The Apply step pipes tf apply into tee so the output can be captured for
the Kosli attestation. GitHub Actions' default shell on Linux is
"bash -e {0}", which sets errexit but not pipefail, so the step's exit
status was tee's rather than tf's. A failed apply therefore left the
step green, and the job only broke later in "Apply summary" when its
grep for "Apply complete!" found nothing - reporting the failure in the
wrong place.
Setting "shell: bash" explicitly makes Actions use
"bash --noprofile --norc -eo pipefail {0}", so a non-zero exit from
tf apply now fails the step and the overall job.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ToreMerkely
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Applystep pipestf applyintoteeso the output can be captured for the Kosli attestation:GitHub Actions' default shell on Linux is
bash -e {0}— errexit, but notpipefail. The step'sexit status was therefore
tee's (effectively always 0), so a failedtf applyleft the stepgreen.
The job did eventually fail, but in the wrong place:
Apply summarygreps the captured output forApply complete!, which exits 1 when the apply didn't complete. The result was a confusing red"Apply summary" sitting under a green "Apply".
Fix
Set
shell: bashexplicitly on the step. That makes Actions usebash --noprofile --norc -eo pipefail {0}, so a non-zero exit fromtf applypropagates through thepipe and fails the step — and the overall job — at the point the failure actually happened.
This is the only piped
run:in the workflow, so no other steps are affected.🤖 Generated with Claude Code