Skip to content

Commit ce7e2dc

Browse files
authored
Enable provision option only on main (#79)
1 parent ff9a0a4 commit ce7e2dc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/terraform.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
aws-iam-role-arn:
1717
required: true
1818
type: string
19+
provision-on-main:
20+
required: false
21+
type: boolean
22+
default: true
1923
secrets:
2024
github-token:
2125
description: Token to download Terraform modules from GitHub
@@ -45,7 +49,7 @@ jobs:
4549
run: terraform fmt -check
4650

4751
provision:
48-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
52+
if: ${{ inputs.provision-on-main && github.ref == 'refs/heads/main' }}
4953
needs: check
5054
runs-on: ubuntu-latest
5155
steps:

0 commit comments

Comments
 (0)