Skip to content

Commit

Permalink
Merge branch 'main' of github.e.it.census.gov:CSVD/automation-repos
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Aug 16, 2024
2 parents 0d93947 + bd9bb12 commit 205ce05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/terraform_apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/terraform_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down

0 comments on commit 205ce05

Please sign in to comment.