Skip to content

Commit dd42d7e

Browse files
committed
perf: run tf_plan_apply on PR merges
1 parent 3d95c02 commit dd42d7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/tf_plan_apply.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
8888
# Save plan to artifacts
8989
- name: Publish OpenTofu Plan
90-
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
90+
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event.pull_request.merged }}
9191
uses: actions/upload-artifact@v4
9292
with:
9393
name: tfplan
@@ -96,7 +96,7 @@ jobs:
9696
tofu-apply:
9797
name: 'OpenTofu Apply'
9898
needs: [tofu-plan]
99-
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && needs.tofu-plan.outputs.tf_plan_exit_code == 2 }}
99+
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event.pull_request.merged) && needs.tofu-plan.outputs.tf_plan_exit_code == 2 }}
100100
runs-on: ${{ fromJSON(inputs.runs_on) }}
101101
environment: ${{ github.ref_name }}
102102
env:

0 commit comments

Comments
 (0)