action-sqlfluff
action-sqlfluff copied to clipboard
"Show output - optional" step shows empty results
code I'm using:
name: sqlfluff with reviewdog on: pull_request: jobs: test-check: name: Lint-and-Parse-SQL runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: yu-iskw/[email protected]
id: lint-sql
#id: sqlfluff-with-reviewdog-in-composite
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
sqlfluff_version: "2.0.7"
sqlfluff_command: "lint" # Or "lint"
config: "${{ github.workspace }}/.sqlfluff"
paths: '${{ github.workspace }}/sql'
fail_on_error: true
- 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 '.'
echo '${{ steps.lint-sql.outputs.sqlfluff-exit-code }}' | jq -r '.'
echo '${{ steps.lint-sql.outputs.reviewdog-return-code }}' | jq -r '.'
The check results as a success even when violations are found. I believe, Brewdog is supposed to fail the check with fail_on_error: true parameter set but I think there is a brewdog bug waiting for a fix to address this issue.
So for now, I'm trying to obtain the output value, specifically for sqlfluff-exit-code and reviewdog-return-code to allow to use these to dictate whether the check should be a success or a fail but I can't seem to get the output values to show!
Any help would be appreciated, thanks!