Skip to content

Commit

Permalink
add terraform CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cageyv authored Jan 19, 2021
1 parent 455fd0e commit 4d1cf34
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 'base'

on:
push:
tags: [ v* ]
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
tflint:
name: TFLint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: TFLint
run: |
curl https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
tflint
fmt:
name: fmt
runs-on: ubuntu-20.04
container:
image: hashicorp/terraform:latest
steps:
- uses: actions/checkout@master
- run: terraform fmt --recursive -check=true

validate:
name: validate
runs-on: ubuntu-20.04
container:
image: hashicorp/terraform:latest
steps:
- uses: actions/checkout@master
- name: terraform validate
run: |
terraform init
terraform validate -no-color
env:
AWS_DEFAULT_REGION: "eu-central-1"

tfsec:
name: TFSec
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: TFSec
uses: triat/[email protected]
with:
tfsec_actions_comment: false

0 comments on commit 4d1cf34

Please sign in to comment.