diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml index 27c283f..e8eb613 100644 --- a/.github/workflows/terraform_plan.yaml +++ b/.github/workflows/terraform_plan.yaml @@ -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 }}" diff --git a/backend.tf b/backend.tf index 9f61e98..aa514fb 100644 --- a/backend.tf +++ b/backend.tf @@ -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" } diff --git a/workflows/terraform-plan.yaml.tpl b/workflows/terraform-plan.yaml.tpl index c941500..f4a20cb 100644 --- a/workflows/terraform-plan.yaml.tpl +++ b/workflows/terraform-plan.yaml.tpl @@ -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: @@ -48,7 +50,7 @@ jobs: - name: Autoformat Halt if: env.auto_format == 'true' - run: exit 1 + run: exit 0 - name: Terraform Init id: init @@ -90,4 +92,4 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, body: output - }) \ No newline at end of file + })