forked from fwickert/VirtualTeacherGenAIDemo
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 887 Bytes
/
terraform.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Terraform
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
terraform:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.0.11
- name: Set up Azure credentials
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Initialize Terraform
run: terraform init
working-directory: ./deploy
- name: Validate Terraform
run: terraform validate
working-directory: ./deploy
- name: Plan Terraform
run: terraform plan
working-directory: ./deploy
- name: Apply Terraform
if: github.ref == 'refs/heads/main'
run: terraform apply -auto-approve
working-directory: ./deploy