DCLint GitHub Actions
September 5, 2025 ยท View on GitHub
Lint Docker Compose files with DCLint, using GitHub Actions.
This repository provides three official GitHub Actions:
| Variant | Description |
|---|---|
| Node.js (base) | Runs dclint via npx (requires Node in runner) |
| Docker | Runs dclint inside Docker container (requires Docker in runner) |
| Reviewdog | Integrates 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
| Name | Description | Default |
|---|---|---|
path | Path to file or directory | . |
recursive | Recursively search directories | false |
fix | Apply automatic fixes | false |
dry-run | Simulate fixes without saving | false |
formatter | Output formatter (e.g., json, github) | github |
max-warnings | Max warnings allowed before failure | -1 |
exclude | Exclude files or directories (space-separated) | |
disable-rule | Skip specific rules (space-separated) | |
debug | Enable debug output | false |
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
| Name | Description | Default |
|---|---|---|
args | Arguments 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
| Name | Description | Default |
|---|---|---|
github_token | GitHub token for reviewdog | ${{ secrets.GITHUB_TOKEN }} |
tool_name | Name for tool display in reviewdog report | dclint |
reporter | Reporter of reviewdog command [github-pr-check, github-pr-review] | github-pr-check |
filter_mode | Filtering mode for the reviewdog command [added, diff_context, file, nofilter] | added |
fail_level | 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 [none, any, info , warning, error] | none |
level | Report level for reviewdog [info, warning, error] | error |
reviewdog_flags | Additional flags to pass to reviewdog | |
dclint_flags | Additional 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
dclintandreviewdogare checked weekly via a scheduled GitHub Action. The currently used version ofdclintis stored in theVERSION_DCLINTfile 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:
- Email: s.kupletsky@gmail.com
- ะฅ/Twitter: zavoloklom
- Instagram: zavoloklom
- GitHub: zavoloklom
Also, you can support this project with a one-time donation or becoming a sponsor: