Skip to content

Commit 89191d8

Browse files
committed
Also run Terraform plan on PRs
1 parent d89843a commit 89191d8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/deploy-lnt.llvm.org.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ name: Deploy lnt.llvm.org
22

33
on:
44
push:
5-
branches: ['main']
5+
paths:
6+
- '.github/workflows/deploy-lnt.llvm.org.yaml'
7+
- 'deployment/*'
8+
pull_request:
69
paths:
710
- '.github/workflows/deploy-lnt.llvm.org.yaml'
811
- 'deployment/*'
@@ -29,5 +32,9 @@ jobs:
2932
- name: Initialize Terraform
3033
run: terraform -chdir=deployment init
3134

35+
- name: Plan Terraform changes
36+
run: terraform -chdir=deployment plan
37+
3238
- name: Apply Terraform changes
39+
if: ${{ github.ref == 'refs/heads/main' }} # only apply changes on pushes to main
3340
run: terraform -chdir=deployment apply -auto-approve

0 commit comments

Comments
 (0)