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

switch to enable only format and validate #105

Merged
merged 4 commits into from
Oct 9, 2024
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
21 changes: 18 additions & 3 deletions .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@ name: terraform-ci
on:
workflow_call:
inputs:
enable_format:
description: Run only format and validate
type: boolean
default: true
required: false
enable_lint:
description: Run only linting
type: boolean
default: true
required: false
enable_security_check:
description: Run only security checks
type: boolean
default: true
required: false
upload_sarif:
description: Upload SARIF results to Github. Available in public repos, or private/internal repos for enterprises with Github Advanced Security.
type: boolean
Expand Down Expand Up @@ -98,7 +113,7 @@ env:

jobs:
fmt-validate:
if: github.ref_name != 'main'
if: github.ref_name != 'main' && inputs.enable_format == true
name: Format and Validate
runs-on:
- ${{ inputs.default_runner_override_label }}
Expand Down Expand Up @@ -197,7 +212,7 @@ jobs:

lint:
name: Linting
if: github.ref_name != 'main'
if: github.ref_name != 'main' && inputs.enable_lint == true
runs-on:
- ${{ inputs.default_runner_override_label }}
- ${{ inputs.runner_label }}
Expand Down Expand Up @@ -325,7 +340,7 @@ jobs:
#steps.tflint.outcome check for outcome
security:
name: Security Checks
if: github.ref_name != 'main'
if: github.ref_name != 'main' && inputs.enable_security_check == true
runs-on:
- ${{ inputs.default_runner_override_label }}
- ${{ inputs.runner_label }}
Expand Down