terraform-linters / setup-tflint

A GitHub action that installs Terraform linter TFLint
MIT License
149 stars 38 forks source link

prevent job from failing when there are only warnings #172

Closed kaykhan closed 1 year ago

kaykhan commented 1 year ago

How can i prevent the job from failing when there are only warnings showing, i only want it to fail when there is an error.

jobs:
  format:
    name: format
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v3
    - name: Terraform Format
      id: format
      run: terraform fmt -check -recursive
  lint:
    needs: format
    name: lint 
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v3
    - uses: terraform-linters/setup-tflint@v3
      name: Setup TFLint
      with:
        tflint_version: v0.44.1
    - name: Show version
      run: tflint --version
    - name: Init TFLint
      run: tflint --init
      env:
        GITHUB_TOKEN: ${{ github.token }}
    - name: Run TFLint
      run: tflint

image

kaykhan commented 1 year ago
   --minimum-failure-severity=[error|warning|notice]         Sets minimum severity level for exiting with a non-zero error code