Skip to content

Commit

Permalink
try to increase length of output
Browse files Browse the repository at this point in the history
  • Loading branch information
tjololo committed Jan 10, 2025
1 parent fb2f5d6 commit 9698ed9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions actions/terraform/plan/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,15 @@ runs:
- name: truncate terraform plan result
shell: bash
run: |
echo "Reading tfplan.log"
plan=$(cat ${{ inputs.working_directory }}/tfplan.log)
echo "Plan result length: ${#plan}"
plan=$(echo "${plan//\`}" | grep -v 'Refreshing state' | tail --bytes 110000)
original_length=${#plan}
plan=$(echo "${plan//\`}" | grep -v 'Refreshing state' | tail --bytes 120000)
new_length=${#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
if [ $new_length -lt $original_length ]; then
echo '[Truncated to 120000 bytes! See logoutput for complete plan]' >> $GITHUB_ENV
fi
echo "${plan}" >> $GITHUB_ENV
echo >> $GITHUB_ENV
echo "${{ env.DELIMITER }}2" >> $GITHUB_ENV
Expand Down

0 comments on commit 9698ed9

Please sign in to comment.