astral-sh/ruff-action
A GitHub Action to run Ruff, an extremely fast Python linter and code formatter.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 5, 2026
- License
- Apache 2.0
Pinned Snippet
uses: astral-sh/ruff-action@278981a28ce3188b1e39527901f38254bf3aac89 # v4.1.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| args | Arguments passed to Ruff. Use `ruff --help` to see available options. Defaults to `check`. | no | check |
| src | Source path(s) or @actions/glob pattern(s) to run Ruff on. Defaults to the current workspace. | no | ${{ github.workspace }} |
| version | The version of Ruff to use, e.g., `0.6.0`. Defaults to the first discoverable version in pyproject.toml searched upward from `src`, or `latest`. | no | "" |
| version-file | Path to a pyproject.toml, requirements.txt or uv.lock file to read the version from. If parsing fails, the action warns and falls back to `latest`. | no | — |
| checksum | The checksum of the ruff version to install | no | — |
| manifest-file | URL to a custom manifest file in the astral-sh/versions format. | no | — |
| download-from-astral-mirror | Download Ruff from the Astral mirror instead of directly from GitHub Releases. | no | true |
| github-token | Used for authenticated downloads of Ruff release artifacts from GitHub. | no | ${{ github.token }} |
Outputs
| name | description |
|---|---|
| ruff-version | The installed ruff version. Useful when using latest. |