Skip to content

Commit a1113fc

Browse files
authored
Merge pull request #2 from Parsaloi/cicd
Create deploy.yml
2 parents 5a36643 + 24e8554 commit a1113fc

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/deploy.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy Infrastructure
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
validate:
11+
runs-on: self-hosted
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Check Requirements
15+
run: ./scripts/utils/validators.sh terraform virsh
16+
- name: Validate Terraform
17+
run: ./scripts/terraform/validate.sh
18+
19+
plan:
20+
needs: validate
21+
runs-on: self-hosted
22+
steps:
23+
- name: Create Plan
24+
run: ./scripts/terraform/plan.sh
25+
26+
deploy:
27+
needs: plan
28+
runs-on: self-hosted
29+
steps:
30+
- name: Apply Infrastructure
31+
run: ./scripts/terraform/apply.sh
32+
33+
verify:
34+
needs: deploy
35+
runs-on: self-hosted
36+
steps:
37+
- name: Verify VM
38+
run: ./scripts/vm/verify.sh

0 commit comments

Comments
 (0)