diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7a22e09..87f018c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -37,6 +37,11 @@ jobs: - run: terraform show -no-color out.tfplan | tee plan - uses: actions/github-script@v7 + env: + FMT_OUTPUT: ${{ steps.fmt.outcome }} + INIT_OUTPUT: ${{ steps.init.outcome }} + VALIDATE_OUTPUT: ${{ steps.validate.outcome }} + PLAN_OUTPUT: ${{ steps.plan.outcome }} with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | @@ -55,9 +60,9 @@ jobs: return comment.user.type === 'Bot' && comment.body.includes('Terraform Format and Style') }) - const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\` - #### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\` - #### Terraform Validation 🤖\`${{ steps.validate.outcome }}\` + const output = `#### Terraform Format and Style 🖌\`${process.env.FMT_OUTPUT}\` + #### Terraform Initialization ⚙️\`${process.env.INIT_OUTPUT}\` + #### Terraform Validation 🤖\`${process.env.VALIDATE_OUTPUT}\`
Validation Output \`\`\`\n @@ -66,7 +71,7 @@ jobs:
- #### Terraform Plan 📖\`${{ steps.plan.outcome }}\` + #### Terraform Plan 📖\`${process.env.PLAN_OUTPUT}\`
Show Plan