Skip to content

Commit 24f1665

Browse files
Create .github/workflows/opsless_infra.yml
1 parent 08b973a commit 24f1665

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
name: Opsless - Infra
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- 'opsless_infra/**' # Only trigger if files in opsless_infra/ are changed
10+
- '.github/workflows/opsless_infra.yml' # (optional) if you want updates to the workflow itself to trigger a run
11+
12+
jobs:
13+
terraform:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
19+
- name: Setup Terraform
20+
uses: hashicorp/setup-terraform@v2
21+
with:
22+
terraform_version: 1.4.0 # Set your preferred version
23+
24+
- name: Terraform Init
25+
working-directory: opsless_infra
26+
run: terraform init
27+
28+
- name: Terraform Plan
29+
working-directory: opsless_infra
30+
run: terraform plan
31+
32+
- name: Terraform Apply
33+
working-directory: opsless_infra
34+
run: terraform apply -auto-approve

0 commit comments

Comments
 (0)