Skip to content

feat: Add CI for opentofu #14

feat: Add CI for opentofu

feat: Add CI for opentofu #14

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
strategy:
fail-fast: false
matrix:
module: ["github"]
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=../.tflint.hcl --format compact
working-directory: ${{ matrix.module }}
opentofu-trivy:
name: Trivy
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module: ["github"]
steps:
- uses: actions/checkout@v4
- uses: aquasecurity/trivy-action@master
with:
scan-type: "config"
scan-ref: ${{ matrix.module }}
format: "table"
exit-code: "1"