sqlfluff github workflow

sqlfluff github workflow isn’t working correctly. It passes, when it shouldn’t pass. I have a yml file and .sqlfluff file with custom rules.

I’m doing this because I want a check before we commit to a repo to see if the linter was ran.

I’ve tried a few solutions online, none seem to work for me.

.sqlfluff file:

# This change (from jinja to dbt templater) will make linting slower
# because linting will first compile dbt code into data warehouse code.
templater = dbt
runaway_limit = 10
max_line_length = 120
indent_unit = space
tab_space_size = 4
indented_joins = False
indented_ctes = False
indented_using_on = True
indented_on_contents = True
indented_then = False
indented_then_contents = True
allow_implicit_indents = True
template_blocks_indent = False
# This is a comma seperated list of elements to skip
# indentation edits to.
skip_indentation_in = script_content
# If comments are found at the end of long lines, we default to moving
# them to the line _before_ their current location as the convention is
# that a comment precedes the line it describes. However if you prefer
# comments moved _after_, this configuration setting can be set to "after".
trailing_comments = before

tab_space_size = 4

spacing_before = touch
line_position = leading

capitalisation_policy = lower

aliasing = explicit

aliasing = explicit

allow_scalar = False

extended_capitalisation_policy = lower

capitalisation_policy = lower

capitalisation_policy = lower

[sqlfluff:rules:ambiguous.column_references]  # Number in group by
group_by_and_order_by_style = implicit

yml file:

name: sqlfluff with reviewdog
    name: runner / sqlfluff (github-check)
    runs-on: ubuntu-latest
      - uses: actions/checkout@v2
      # only run when a comment requests linting
      - uses: khan/pull-request-comment-trigger@master
        id: check
          trigger: '/lint'
          reaction: rocket
          GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
      - uses: yu-iskw/action-sqlfluff@v3
        if: steps.check.outputs.triggered == 'true'
        id: lint-sql
          github_token: ${{ secrets.github_token }}
          reporter: github-pr-review
          sqlfluff_version: "0.11.1"
          sqlfluff_command: "fix" # Or "lint"
          config: "${{ github.workspace }}/.sqlfluff"
          paths: '${{ github.workspace }}/models'
      - name: 'Show outputs (Optional)'
        shell: bash
        run: |
          echo '${{ steps.lint-sql.outputs.sqlfluff-results }}' | jq -r '.'
          echo '${{ steps.lint-sql.outputs.sqlfluff-results-rdjson }}' | jq -r '.'