-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (33 loc) · 1.15 KB
/
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
name: "Terraform test"
on: [pull_request]
jobs:
tflint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: TFLint
uses: docker://ghcr.io/terraform-linters/tflint:v0.48.0
fmt-and-validate:
name: fmt and validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install terraform
env:
TF_VERSION: 1.5.7
run: |
# Install terraform
wget https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip -O /tmp/terraform.zip
yes "y" | sudo unzip -d /usr/local/bin/ /tmp/terraform.zip
- name: Format Code
run: make fmt
- name: Validate Code
run: make validate
- name: Validate ignition
env:
IGNITION_VERSION: 2.14.0
run: |
wget https://github.com/coreos/ignition/releases/download/v${IGNITION_VERSION}/ignition-validate-x86_64-linux -O /tmp/ignition-validate
sudo chmod +x /tmp/ignition-validate && sudo mv /tmp/ignition-validate /usr/local/bin/ignition-validate
make validate-ign