What ruff-action is

ruff-action is documented in the Ruff integrations guide as one way to run Ruff in continuous integration. By default it acts as a pass-fail test, failing a workflow when a repository contains lint rule violations as defined by its configuration. Under the hood the action installs and runs ruff directly, so any supported ruff command can be executed through it, such as ruff check --fix. This distinguishes it from Ruff itself, which is the underlying tool the action installs.

  • GitHub Action wrapper around Ruff
  • Default behaviour is a pass-fail lint check
  • Can run any supported ruff command
  • Installs and invokes ruff directly

Source: Integrations | Ruff

Usage in a workflow

The documentation shows ruff-action being added to a repository by creating a workflow file, for example .github/workflows/ruff.yml, that checks out the repository and then invokes the action. It can also be included as a single step inside any other existing workflow file. The referenced usage form is astral-sh/ruff-action@v3.

  • Referenced as uses: astral-sh/ruff-action@v3
  • Typically paired with actions/checkout@v4
  • Can be placed in a dedicated workflow or an existing one
  • Example triggers: push and pull_request

Source: Integrations | Ruff

Configuration parameters

ruff-action accepts optional configuration parameters supplied through the with: block of a workflow step. Three parameters are documented, each with a default value, so the action can be used without configuration. The documentation gives an example that runs 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, and the workflow examples in the documentation use ubuntu-latest. It can be used with any published Ruff version, meaning any version available on PyPI, which is selected through the version parameter. The same integrations page also documents alternative ways of running Ruff in CI, including a GitLab CI/CD configuration, the ruff-pre-commit hook and official Docker images.

  • Works on all GitHub-hosted runners
  • Supports any Ruff version published on PyPI
  • Alternatives documented: GitLab CI/CD, pre-commit, Docker images

Source: Integrations | Ruff

Sources

  1. Integrations | Ruff https://docs.astral.sh/ruff/integrations/ Verified 19 Sep 2026

Last verified 19 Sep 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.