Problem
The Plan summary step in .github/workflows/base.yml extracts a one-line summary from the saved
plan with:
line=$(grep -E 'No changes\.|Plan: ' /tmp/<env>.plan.txt)
GitHub Actions runs run: blocks under bash -e, so when grep matches nothing it exits 1 and
takes the whole step (and job) down.
A Terraform plan that changes only outputs prints neither Plan: nor No changes. — it prints
Changes to Outputs: — so any change that adds or edits outputs without touching resources fails
the plan workflow.
Seen in capture-managed:
https://github.com/kosli-dev/capture-managed/actions/runs/33159178074/job/98809231312
Proposed fix
Tolerate a non-matching grep and fall back to the Changes to Outputs: header, then to a generic
message, so the summary degrades gracefully instead of failing the run. has_changes is unaffected:
an outputs-only plan has no No changes. line, so it correctly reports true and the apply job
still runs.
Problem
The
Plan summarystep in.github/workflows/base.ymlextracts a one-line summary from the savedplan with:
GitHub Actions runs
run:blocks underbash -e, so whengrepmatches nothing it exits 1 andtakes the whole step (and job) down.
A Terraform plan that changes only outputs prints neither
Plan:norNo changes.— it printsChanges to Outputs:— so any change that adds or edits outputs without touching resources failsthe plan workflow.
Seen in capture-managed:
https://github.com/kosli-dev/capture-managed/actions/runs/33159178074/job/98809231312
Proposed fix
Tolerate a non-matching
grepand fall back to theChanges to Outputs:header, then to a genericmessage, so the summary degrades gracefully instead of failing the run.
has_changesis unaffected:an outputs-only plan has no
No changes.line, so it correctly reportstrueand the apply jobstill runs.