Skip to content

Commit

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

* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Update backend.tf

* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Update terraform_plan.yaml

* Autoformatting TF Code

* Refactor image pipeline module names and update workflows

* Refactor image pipeline module names and update workflows

* Update terraform_plan.yaml

* Update terraform-plan.yaml.tpl

---------

Co-authored-by: arnol377 <github-actions@census.gov>
Co-authored-by: Dave Arnold <dave@roknsound.com>
  • Loading branch information
3 people committed Aug 15, 2024
1 parent bef86d9 commit 1773555
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/terraform_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ jobs:
run: terraform plan -no-color
continue-on-error: true

- uses: CSVD/gh-actions-github-script@v6
- 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 }}"
Expand Down
2 changes: 1 addition & 1 deletion backend.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
backend "s3" {
bucket = "inf-tfstate-229685449397"
key = "csvd-dev-gov/common/apps/terraform-repos"
key = "csvd-dev-gov/common/apps/terraform-repos"
region = "us-gov-east-1"
dynamodb_table = "tf_remote_state"
}
Expand Down
8 changes: 5 additions & 3 deletions workflows/terraform-plan.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

with:
ref: $${{ github.head_ref }}
token: $${{ secrets.GH_TOKEN }}

- uses: CSVD/gh-actions-setup-node@v3
with:
Expand All @@ -48,7 +50,7 @@ jobs:

- name: Autoformat Halt
if: env.auto_format == 'true'
run: exit 1
run: exit 0

- name: Terraform Init
id: init
Expand Down Expand Up @@ -90,4 +92,4 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})
})

0 comments on commit 1773555

Please sign in to comment.