Skip to content

Commit

Permalink
try routing it through env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
tjololo committed Jan 10, 2025
1 parent 31efa43 commit f584443
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions actions/terraform/plan/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,15 @@ runs:
run: echo "DELIMITER=$(uuidgen)" >> $GITHUB_ENV
- name: truncate terraform plan result
shell: bash
env:
PLAN_STDOUT: ${{ steps.plan.outputs.stdout }}
PLAN_STDERR: ${{ steps.plan.outputs.stderr }}
run: |
plan=$(cat <<${{ env.DELIMITER }}1
${{ format('{0}{1}', steps.plan.outputs.stdout, steps.plan.outputs.stderr) }}
${{ format('{0}{1}', env.PLAN_STDOUT, env.PLAN_STDERR) }}
${{ env.DELIMITER }}1
)
plan=$(echo "${plan@Q}" | grep -v 'Refreshing state' | tail --bytes 200000)
echo "${plan}"
echo "PLAN<<${{ env.DELIMITER }}2" >> $GITHUB_ENV
echo '[Lines containing Refreshing state removed]' >> $GITHUB_ENV
echo '[Maybe further truncated see logs for complete plan output]' >> $GITHUB_ENV
Expand Down

0 comments on commit f584443

Please sign in to comment.