-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (38 loc) · 1.25 KB
/
modules.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
name: 'Test Selectel Terraform modules'
on:
schedule:
- cron: '0 7 * * *' # run every day at 10:00 MSK
workflow_dispatch:
jobs:
setup:
name: 'Test Selectel Terraform modules'
runs-on: self-hosted
env:
TF_VAR_selectel_domain_name: ${{ secrets.SELECTEL_ID }}
TF_VAR_selectel_user_admin_user: ${{ secrets.SERVICE_USER }}
TF_VAR_selectel_user_admin_password: ${{ secrets.SERVICE_PASSWORD }}
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Setup NodeJS v20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup Terraform
uses: hashicorp/[email protected]
# - name: Run Checkov action # suppressed for now because it fails to copy a file inside a self-hosted runner
# uses: bridgecrewio/checkov-action@v12
# with:
# quiet: true
# directory: .
# output_format: cli
# framework: terraform,github_actions
# container_user: 1000
- name: Lint Terraform
run: terraform fmt -diff -check -recursive
- name: Init Terraform
run: terraform init
- name: Terraform apply
run: terraform apply -auto-approve
- name: Terraform destroy
run: terraform destroy -auto-approve