GitHub Action: Run dotenv-linter with reviewdog ๐ถ
January 12, 2026 ยท View on GitHub
This action runs dotenv-linter with
reviewdog on pull requests to lint .env files.
Examples
With github-pr-check
By default, with reporter: github-pr-check an annotation is added to the line:

With github-pr-review
With reporter: github-pr-review a comment is added to the Pull Request Conversation:

With github-code-suggestions
With reporter: github-code-suggestions a code suggestion is added to the Pull Request Conversation:

Inputs
github_token
GITHUB_TOKEN. Default is ${{ github.token }}.
dotenv_linter_flags
Optional. dotenv-linter flags. (dotenv-linter <dotenv_linter_flags>)
tool_name
Optional. Tool name to use for reviewdog reporter. Useful when running multiple actions with different config.
reporter
Optional. Reporter of reviewdog command [github-pr-check, github-pr-review, github-code-suggestions].
The default is github-pr-check.
filter_mode
Optional. Filtering mode for the reviewdog command [added, diff_context, file, nofilter].
Default is added.
fail_level
Optional. If set to none, always use exit code 0 for reviewdog. Otherwise, exit code 1 for reviewdog if it finds at least 1 issue with severity greater than or equal to the given level.
Possible values: [none, any, info, warning, error]
Default is none.
fail_on_error
Deprecated, use fail_level instead.
reviewdog_flags
Optional. Additional reviewdog flags.
Simple check example
name: dotenv
on: [pull_request]
jobs:
dotenv-linter:
name: runner / dotenv-linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Run dotenv-linter
uses: dotenv-linter/action-dotenv-linter@v3
with:
reporter: github-pr-review # Default is github-pr-check
dotenv_linter_flags: --ignore-checks UnorderedKey
Code suggestions example
name: dotenv
on: [pull_request]
jobs:
dotenv-linter:
name: runner / dotenv-linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Run dotenv-linter with code suggestions
uses: dotenv-linter/action-dotenv-linter@v3
with:
reporter: github-code-suggestions