Skip to content

Commit

Permalink
standardize workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenschneider committed Oct 19, 2024
1 parent cfd0eec commit 36e85e3
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 61 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: "lint"
on:
push:
branches:
- "master"
- "main"
pull_request: {}
workflow_dispatch: {}

permissions:
contents: read

jobs:
fmt:
name: fmt
runs-on: ubuntu-latest
container: ghcr.io/opentofu/opentofu:latest
steps:
- uses: actions/checkout@v4
- name: fmt
run: tofu fmt -recursive -check

tflint:
name: tflint
runs-on: ubuntu-latest
container: ghcr.io/soerenschneider/terraform-tools:latest
steps:
- uses: actions/checkout@v4
- name: tflint
run: tflint --recursive
35 changes: 35 additions & 0 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: "security scanners"
on:
push:
branches:
- master
- main
pull_request: {}
workflow_dispatch: {}

permissions:
contents: read

jobs:
trivy:
name: trivy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner in fs mode
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '.'
scanners: 'vuln,misconfig,secret'
trivy-config: ".trivy.yaml"

checkov:
name: checkov
runs-on: ubuntu-latest
container: ghcr.io/soerenschneider/terraform-tools:latest
steps:
- uses: actions/checkout@v4
- name: checkov
run: checkov -d . --quiet
61 changes: 0 additions & 61 deletions .github/workflows/tf-lint.yaml

This file was deleted.

0 comments on commit 36e85e3

Please sign in to comment.