From 9f6f0993f78ac7b7adba8fa1a4072a65e31f0603 Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Fri, 16 Aug 2024 09:01:08 -0700 Subject: [PATCH 1/3] Update terraform_plan.yaml --- .github/workflows/terraform_plan.yaml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml index 50b6820..27c283f 100644 --- a/.github/workflows/terraform_plan.yaml +++ b/.github/workflows/terraform_plan.yaml @@ -68,24 +68,13 @@ jobs: - name: Terraform Plan id: plan - if: github.event_name == 'pull_request' - run: terraform plan -no-color -out=${{ vars.plan_cache }}/${{ github.sha }} - continue-on-error: true - - - name: Terraform Plan - if: github.event_name != 'pull_request' run: terraform plan -no-color continue-on-error: true - - name: Terraform Show plan - if: github.event_name == 'pull_request' - run: echo ::set-output name=terraform_plan::$(terraform show ${{ vars.plan_cache }}/${{ github.sha }}) - - - name: Post Terraform Plan to PR - uses: CSVD/gh-actions-github-script@v6 + - uses: CSVD/gh-actions-github-script@v6 if: github.event_name == 'pull_request' env: - PLAN: "terraform\n${{ env.terraform_plan }}" + PLAN: "terraform\n${{ steps.plan.outputs.stdout }}" with: github-token: ${{ secrets.GH_TOKEN }} script: | From 5a7471ad795209127ce54402c83aaab9cffdd11c Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Fri, 16 Aug 2024 09:17:03 -0700 Subject: [PATCH 2/3] Update terraform_apply.yaml --- .github/workflows/terraform_apply.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/terraform_apply.yaml b/.github/workflows/terraform_apply.yaml index a9a4d05..292208a 100644 --- a/.github/workflows/terraform_apply.yaml +++ b/.github/workflows/terraform_apply.yaml @@ -11,7 +11,7 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" - build: + Apply: # The type of runner that the job will run on runs-on: [ automation-repos ] env: From bd9bb12480b3e8b2499d6cf68c0079d1ba457fde Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Fri, 16 Aug 2024 09:17:19 -0700 Subject: [PATCH 3/3] Update terraform_plan.yaml --- .github/workflows/terraform_plan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml index 27c283f..25f471d 100644 --- a/.github/workflows/terraform_plan.yaml +++ b/.github/workflows/terraform_plan.yaml @@ -10,7 +10,7 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" - build: + Plan: # The type of runner that the job will run on runs-on: [ automation-repos ] env: