This action will run haml-lint together with reviewdog to create a nice report on your pull requests.
This action was created using the action-template created by the reviewdog team.
inputs:
github_token:
description: 'GITHUB_TOKEN'
default: '${{ github.token }}'
workdir:
description: 'Working directory relative to the root directory.'
default: '.'
### Flags for haml-lint
haml_lint_flags:
description: 'Additional haml-lint flags'
default: ''
### Flags for rubocop
rubocop_version:
description: 'The rubocop version to install. Choose `gemfile` to use the version from your gemfile'
rubocop_extensions:
description: 'Rubocop extensions to install'
default: 'rubocop-rails rubocop-performance rubocop-rspec rubocop-i18n rubocop-rake'
### Flags for reviewdog ###
level:
description: 'Report level for reviewdog [info,warning,error]'
default: 'error'
reporter:
description: 'Reporter of reviewdog command [github-pr-check,github-check,github-pr-review].'
default: 'github-pr-check'
filter_mode:
description: |
Filtering for the reviewdog command [added,diff_context,file,nofilter].
Default is added.
default: 'added'
fail_on_error:
description: |
Exit code for reviewdog when errors are found [true,false]
Default is `false`.
default: 'false'
reviewdog_flags:
description: 'Additional reviewdog flags'
default: ''
name: reviewdog
on: [pull_request]
jobs:
linter_name:
name: runner / haml-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: patch-technology/action-haml-lint@v1
with:
github_token: ${{ secrets.github_token }}
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
reporter: github-pr-review
# Change reporter level if you need.
# GitHub Status Check won't become failure with warning.
level: warning
# Change the config file and other haml-lint flags
haml_lint_flags: -c .haml-config.yml
# Set the rubocop version to the one from your Gemfile
rubocop_version: gemfile