mirror of
https://github.com/RWejlgaard/pez-infra.git
synced 2026-05-06 04:14:43 +00:00
remove refreshing state
This commit is contained in:
parent
2ef2490f77
commit
e477155531
1 changed files with 4 additions and 3 deletions
7
.github/workflows/validate-terraform.yml
vendored
7
.github/workflows/validate-terraform.yml
vendored
|
|
@ -65,9 +65,10 @@ jobs:
|
||||||
script: |
|
script: |
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const raw = fs.readFileSync('terraform/plan_output.txt', 'utf8');
|
const raw = fs.readFileSync('terraform/plan_output.txt', 'utf8');
|
||||||
const truncated = raw.length > 65000
|
const filtered = raw.split('\n').filter(l => !l.includes(': Refreshing state...')).join('\n');
|
||||||
? raw.slice(0, 65000) + '\n\n...(output truncated)'
|
const truncated = filtered.length > 65000
|
||||||
: raw;
|
? filtered.slice(0, 65000) + '\n\n...(output truncated)'
|
||||||
|
: filtered;
|
||||||
const outcome = '${{ steps.plan.outcome }}';
|
const outcome = '${{ steps.plan.outcome }}';
|
||||||
const header = outcome === 'failure' ? '## Terraform Plan — FAILED' : '## Terraform Plan';
|
const header = outcome === 'failure' ? '## Terraform Plan — FAILED' : '## Terraform Plan';
|
||||||
const body = `${header}\n\`\`\`\n${truncated}\n\`\`\``;
|
const body = `${header}\n\`\`\`\n${truncated}\n\`\`\``;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue