Skip to content

Commit 5926edb

Browse files
author
Admin
committed
Optimize workflow for destroy action
1 parent 8fd671c commit 5926edb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/terraform.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373

7474
# 6. Terraform Plan
7575
- name: Terraform Plan
76+
if: github.event_name == 'push' || github.event.inputs.action != 'destroy'
7677
run: |
7778
terraform plan -out=tfplan \
7879
-var='manage_state_bucket=false' \
@@ -82,6 +83,7 @@ jobs:
8283

8384
# 7. Show Plan
8485
- name: Show Terraform Plan
86+
if: github.event_name == 'push' || github.event.inputs.action != 'destroy'
8587
run: |
8688
terraform show -json tfplan | jq '.resource_changes[] | select(.change.actions != ["no-op"])' | head -100
8789

0 commit comments

Comments
 (0)