-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (42 loc) · 1015 Bytes
/
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
name: tf-gcp-easy-wg-quick workflow
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
name: terraform
runs-on: ubuntu-latest
steps:
- name: install
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends shellcheck
- name: checkout
uses: actions/checkout@v4
- name: setup
uses: hashicorp/setup-terraform@v3
- name: tfvars
id: tfvars
run: |
tee terraform.tfvars << EOF
project = "prj"
credentials_file = "/dev/null"
EOF
- name: format
id: fmt
run: terraform fmt -check
- name: init
id: init
run: terraform init
- name: validate
id: validate
run: terraform validate -no-color
- name: shellcheck
run: shellcheck -a -C -s bash -S style -o all instance-startup.bash