Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tg-check): add layers and modules path as input #50

Merged
merged 3 commits into from
Feb 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions .github/workflows/terragrunt-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
required: false
type: string
default: .
modules_path:
required: false
type: string
default: modules
checkov_enabled:
required: false
type: boolean
Expand All @@ -20,9 +24,6 @@ name: terragrunt-quality
jobs:
terragrunt-lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.workdir }}
env:
GITHUB_ACTIONS: true
steps:
Expand All @@ -36,10 +37,10 @@ jobs:
tenv terraform install latest
tenv terragrunt install latest
tenv update-path
- name: terraform fmt of directory modules
run: terraform fmt -check -recursive -diff modules
- name: terragrunt fmt of directory layers
run: terragrunt hclfmt --terragrunt-check --terragrunt-diff layers
- name: terraform fmt of directory ${{ inputs.modules_path }}
run: terraform fmt -check -recursive -diff ${{ inputs.modules_path }}
- name: terragrunt fmt of directory ${{ inputs.workdir }}
run: terragrunt hclfmt --check --diff ${{ inputs.workdir }}
- name: guacamole code quality checks
id: guacamole
uses: padok-team/guacamole-action@1cd4678ecf3f391ec25980769f1565ddd5cc6a4c # v1.3.1
Expand All @@ -49,16 +50,13 @@ jobs:
terragrunt-security:
runs-on: ubuntu-latest
if: inputs.checkov_enabled
defaults:
run:
working-directory: ${{ inputs.workdir }}
steps:
- name: checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: checkov of modules
- name: checkov of ${{ inputs.modules_path }}
uses: bridgecrewio/checkov-action@master
with:
directory: ${{ inputs.workdir }}/modules
directory: ${{ inputs.modules_path }}
framework: terraform
download_external_modules: false
quiet: true
Expand Down