What ruff-action is

ruff-action lets Ruff be used directly as a GitHub Action rather than installed manually in a workflow step. By default it acts as a pass-fail test, confirming that a given repository does not contain any lint rule violations as defined by its configuration. Under the hood the action installs and runs ruff directly, so it can execute any supported ruff command, such as ruff check --fix. This distinguishes it from Ruff itself, which is the underlying linter and formatter being invoked.

  • GitHub Action wrapper around the Ruff CLI
  • Default behaviour is a pass-fail lint check
  • Can run any supported ruff command

Source: Integrations | Ruff

Usage in a workflow

To use ruff-action, a workflow file such as .github/workflows/ruff.yml is created in the repository, triggered on push and pull_request events. The job checks out the repository with actions/checkout@v4 and then calls astral-sh/ruff-action@v3. The action can also be included as a single step inside any other existing workflow file.

  • uses: astral-sh/ruff-action@v3
  • Typically paired with actions/checkout@v4
  • Can run on ubuntu-latest or any GitHub-hosted runner

Source: Integrations | Ruff

Configuration parameters

ruff-action accepts optional configuration parameters supplied through the with: block. These control which Ruff version is installed, which command-line arguments are passed, and which source paths are checked. For example, the action can be configured to run ruff check --select B ./src using Ruff version 0.8.0.

  • version — the Ruff version to install (default: latest)
  • args — command-line arguments passed to Ruff (default: "check")
  • src — source paths passed to Ruff (default: [".", "src"])

Source: Integrations | Ruff

Requirements and compatibility

ruff-action supports all GitHub-hosted runners. It can be used with any published Ruff version, meaning any version available on PyPI. Workflows that prefer not to use the action can instead install Ruff with pip and run ruff check --output-format=github to enable automatic inline annotations.

  • Works with all GitHub-hosted runners
  • Supports any Ruff version published on PyPI
  • Manual alternative: pip install ruff plus ruff check --output-format=github

Source: Integrations | Ruff

Related integrations

The Ruff integrations documentation covers ruff-action alongside other continuous integration and tooling options. These include a GitLab CI/CD configuration, the ruff-pre-commit hook repository for pre-commit, mdformat, and official Docker images. The Docker images are published in variants based on Alpine, Debian slim and buildpack-deps, and are tagged by major, minor and patch version.

  • GitHub Actions
  • GitLab CI/CD
  • pre-commit via ruff-pre-commit
  • mdformat
  • Docker images

Source: Integrations | Ruff

Sources

  1. Integrations | Ruff https://docs.astral.sh/ruff/integrations/ Verified 03 Nov 2026

Last verified 03 Nov 2026. This entry is compiled from the public web pages listed above. Nothing here is stated that those pages do not, and each of them was read on the date shown.