-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f83288
commit 6317c83
Showing
1 changed file
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
workdir: | ||
required: false | ||
type: string | ||
default: . | ||
checkov_enabled: | ||
required: false | ||
type: boolean | ||
default: true | ||
checkov_skip_path: | ||
required: false | ||
type: string | ||
checkov_baseline: | ||
required: false | ||
type: string | ||
|
||
name: terragrunt-quality | ||
jobs: | ||
terragrunt-lint: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ${{ inputs.workdir }} | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | ||
- uses: tofuutils/tenv-github-action@3e0c27a3e1131f756e3973e064ffcca2c139e010 | ||
name: Install Terraform | ||
with: | ||
tool_name: terraform | ||
- name: terraform fmt of directory modules | ||
run: terraform fmt -check -recursive -diff modules | ||
- uses: tofuutils/tenv-github-action@3e0c27a3e1131f756e3973e064ffcca2c139e010 | ||
name: Install Terragrunt | ||
with: | ||
tool_name: terragrunt | ||
- name: wtf | ||
run: | | ||
ls -lah ~ | ||
echo --- | ||
ls -lah $GITHUB_WORKSPACE | ||
echo --- | ||
ls -lah $GITHUB_WORKSPACE/.tenv/Terragrunt/ | ||
echo --- | ||
ls -lah /usr/local/bin/ | ||
- name: terragrunt fmt of directory layers | ||
run: /usr/local/bin/terragrunt hclfmt --terragrunt-check --terragrunt-diff layers | ||
- name: guacamole code quality checks | ||
id: guacamole | ||
uses: padok-team/[email protected] | ||
with: | ||
path: ${{ inputs.workdir }} | ||
verbose: true | ||
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 | ||
uses: bridgecrewio/checkov-action@master | ||
with: | ||
directory: ${{ inputs.workdir }}/modules | ||
framework: terraform | ||
download_external_modules: false | ||
quiet: true | ||
skip_path: ${{ inputs.checkov_skip_path }} | ||
baseline: ${{ inputs.checkov_baseline }} |