DCLint GitHub Actions

September 5, 2025 ยท View on GitHub

GitHub Release GitHub Sponsors

Lint Docker Compose files with DCLint, using GitHub Actions.

This repository provides three official GitHub Actions:

VariantDescription
Node.js (base)Runs dclint via npx (requires Node in runner)
DockerRuns dclint inside Docker container (requires Docker in runner)
ReviewdogIntegrates dclint with reviewdog

Node.js (npx) Action

This variant runs dclint via npx. Requires Node.js 18+ (default in GitHub runners).

Example usage

- uses: docker-compose-linter/dclint-github-action@v1.6.0
  with:
    path: ./path-to-compose-files/
    recursive: true

Inputs

NameDescriptionDefault
pathPath to file or directory.
recursiveRecursively search directoriesfalse
fixApply automatic fixesfalse
dry-runSimulate fixes without savingfalse
formatterOutput formatter (e.g., json, github)github
max-warningsMax warnings allowed before failure-1
excludeExclude files or directories (space-separated)
disable-ruleSkip specific rules (space-separated)
debugEnable debug outputfalse

Output

This action writes a summary to $GITHUB_STEP_SUMMARY.

๐Ÿณ Docker-based Action

This action runs DCLint using Docker image. Requires Docker support (default in GitHub runners).

Example usage

- uses: docker-compose-linter/dclint-github-action/docker-action@v1.6.0
  with:
    args: '["./path-to-compose-files/", "-r", "--debug", "-f", "github"]'

Inputs

NameDescriptionDefault
argsArguments passed to dclint CLI[".", "-f", "github"]

๐Ÿถ Reviewdog-integrated Action

Integrates DCLint with Reviewdog to improve code review experience.

Example usage

name: reviewdog
on: [ pull_request ]
jobs:
  dclint:
    name: runner / dclint
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v4.2.2
      - name: dclint
        uses: docker-compose-linter/dclint-github-action/reviewdog-action@v1.6.0
        with:
          reporter: github-pr-review # Default is `github-pr-check`
          dclint_flags: ./path-to-compose-files/ # Default is `.`

Inputs

NameDescriptionDefault
github_tokenGitHub token for reviewdog${{ secrets.GITHUB_TOKEN }}
tool_nameName for tool display in reviewdog reportdclint
reporterReporter of reviewdog command [github-pr-check, github-pr-review]github-pr-check
filter_modeFiltering mode for the reviewdog command [added, diff_context, file, nofilter]added
fail_levelIf 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 [none, any, info , warning, error]none
levelReport level for reviewdog [info, warning, error]error
reviewdog_flagsAdditional flags to pass to reviewdog
dclint_flagsAdditional CLI flags to pass to dclint.

Output

Reviewdog posts annotations in the PR UI. Errors do not fail the job by default.

Pull Request Examples

Browse example pull requests in docker-compose-linter/example-github-action to see how the actions runs in CI workflows.

Versioning

This repository itself is versioned using semantic-release. All changes are categorized and released based on Conventional Commits.

Dependency Updates

  • The versions of dclint and reviewdog are checked weekly via a scheduled GitHub Action. The currently used version of dclint is stored in the VERSION_DCLINT file and synced across all action variants automatically.
  • If a new version is available, a pull request is automatically created to update all relevant files.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

If you'd like to contribute to this project, please read through the CONTRIBUTING.md file.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project, you agree to abide by its terms.

Changelog

The changelog is automatically generated based on semantic-release and conventional commits.

See the CHANGELOG.md file for detailed lists of changes for each version.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Contacts and Support

If you find this repository helpful, kindly consider showing your appreciation by giving it a star โญ.

If you have any questions or suggestions, feel free to reach out:

Also, you can support this project with a one-time donation or becoming a sponsor:

PayPal Patreon GitHub Sponsors Open Collective