Skip to content

Commit

Permalink
Merge pull request #50 from padok-team/fix/terragrunt-check-path
Browse files Browse the repository at this point in the history
fix(tg-check): add layers and modules path as input
  • Loading branch information
nlevee authored Feb 21, 2025
2 parents c40746a + 586cb3a commit 21d59d1
Showing 1 changed file with 10 additions and 12 deletions.
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

0 comments on commit 21d59d1

Please sign in to comment.