-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (41 loc) · 1.19 KB
/
main.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
45
46
47
48
49
50
51
52
53
54
55
56
name: CI/CD Pipeline for Azure Resume
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
# Add any other build steps you might need, for example, linting, testing, etc.
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
- name: Navigate to Terraform Directory # Add this step
run: cd azure-resume-terraform/
- name: Terraform Initialize
run: terraform init
working-directory: azure-resume-terraform
- name: Terraform Validate
run: terraform validate
working-directory: azure-resume-terraform
- name: Terraform Plan
run: terraform plan -no-color
working-directory: azure-resume-terraform
continue-on-error: true
- name: Terraform Apply
run: terraform apply -auto-approve
working-directory: azure-resume-terraform
- name: Logout of Azure
run: az logout