Skip to content

Commit

Permalink
Update terraform_plan.yaml (#5)
Browse files Browse the repository at this point in the history
* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Update main.tf
  • Loading branch information
arnol377 committed Aug 15, 2024
1 parent 1773555 commit b3c3a02
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/terraform_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,24 @@ 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
if: github.event_name == 'pull_request'
env:
PLAN: "terraform\n${{ steps.plan.outputs.stdout }}"
PLAN: "terraform\n${{ env.terraform_plan }}"
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ locals {
collaborators = {
naray007 = "push",
morga471 = "push",
lolli001 = "pull",
lolli001 = "push",
gomez385 = "push"
}
pull_request_bypassers = [
Expand Down

0 comments on commit b3c3a02

Please sign in to comment.