Skip to content

feat: Add CI for opentofu #24

feat: Add CI for opentofu

feat: Add CI for opentofu #24

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize]
jobs:
opentofu-tflint:
name: TFLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: ~/.tflint.d/plugins
key: ${{ runner.os }}-tflint-${{ hashFiles('.tflint.hcl') }}
- uses: terraform-linters/setup-tflint@v4
with:
tflint_version: v0.48.0
- name: Init tflint
run: tflint --init
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Run tflint
run: tflint --config=$PWD/.tflint.hcl --format compact --recursive
opentofu-trivy:
name: Trivy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: aquasecurity/trivy-action@master
with:
scan-type: "config"
scan-ref: "."
format: "table"
exit-code: "1"