Skip to content

Commit

Permalink
working-directory: ./tf
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Jun 21, 2024
1 parent 1fb0ab3 commit 2a55c49
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Terraform Plan/Apply'
name: 'Terraform'

on:
push:
Expand All @@ -25,13 +25,16 @@ jobs:
terraform_wrapper: false

- name: Terraform Init
working-directory: ./tf
run: terraform init

- name: Terraform Format
working-directory: ./tf
run: terraform fmt -check

- name: Terraform Plan
id: tf-plan
working-directory: ./tf
run: |
export exitcode=0
terraform plan -detailed-exitcode -no-color -out tfplan || export exitcode=$?
Expand All @@ -53,6 +56,7 @@ jobs:

- name: Create String Output
id: tf-plan-string
working-directory: ./tf
run: |
TERRAFORM_PLAN=$(terraform show -no-color tfplan)
Expand Down Expand Up @@ -103,6 +107,7 @@ jobs:
uses: hashicorp/setup-terraform@v3

- name: Terraform Init
working-directory: ./tf
run: terraform init

- name: Download Terraform Plan
Expand All @@ -111,4 +116,5 @@ jobs:
name: tfplan

- name: Terraform Apply
working-directory: ./tf
run: terraform apply -auto-approve tfplan

0 comments on commit 2a55c49

Please sign in to comment.