-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (39 loc) · 1.17 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
37
38
39
40
41
42
43
44
45
46
47
48
name: terraform
on:
pull_request:
paths:
- '.github/workflows/terraform.yml'
- 'terraform/**'
jobs:
terraform:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: get terraform version
id: terraform_version
working-directory: terraform
run: |
echo -n "::set-output name=version::"
cat .terraform-version
- uses: hashicorp/[email protected]
with:
terraform_version: ${{ steps.terraform_version.outputs.version }}
- name: check format
working-directory: terraform
run: terraform fmt -check -recursive
- name: tflint with reviewdog
uses: reviewdog/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
fail_on_error: true
- name: init
working-directory: terraform
run: terraform init -backend=false
- name: validate
working-directory: terraform
run: terraform validate
env:
GITHUB_APP_ID: 123456
GITHUB_APP_INSTALLATION_ID: 12345678
GITHUB_APP_PEM_FILE: "\n"