docs: unify ruff-action versions in README (#396)

This commit is contained in:
project516
2026-07-24 18:20:31 +00:00
committed by GitHub
parent 5b168050b9
commit 2957f9e73d
+16 -16
View File
@@ -44,13 +44,13 @@ By default, Ruff version metadata is resolved from the
### Basic ### Basic
```yaml ```yaml
- uses: astral-sh/ruff-action@v4.0.0 - uses: astral-sh/ruff-action@v4.1.0
``` ```
### Specify a different source directory ### Specify a different source directory
```yaml ```yaml
- uses: astral-sh/ruff-action@v4.0.0 - uses: astral-sh/ruff-action@v4.1.0
with: with:
src: "./src" src: "./src"
``` ```
@@ -60,7 +60,7 @@ By default, Ruff version metadata is resolved from the
Separate multiple `src` values with whitespace. Separate multiple `src` values with whitespace.
```yaml ```yaml
- uses: astral-sh/ruff-action@v4.0.0 - uses: astral-sh/ruff-action@v4.1.0
with: with:
src: >- src: >-
path/to/file1.py path/to/file1.py
@@ -81,7 +81,7 @@ path. Literal glob metacharacters in file or directory names must be escaped
using `@actions/glob` syntax. using `@actions/glob` syntax.
```yaml ```yaml
- uses: astral-sh/ruff-action@v3 - uses: astral-sh/ruff-action@v4.1.0
with: with:
src: "src/**/*.py" src: "src/**/*.py"
``` ```
@@ -97,7 +97,7 @@ using `@actions/glob` syntax.
This action adds ruff to the PATH, so you can use it in subsequent steps. This action adds ruff to the PATH, so you can use it in subsequent steps.
```yaml ```yaml
- uses: astral-sh/ruff-action@v4.0.0 - uses: astral-sh/ruff-action@v4.1.0
- run: ruff check --fix - run: ruff check --fix
- run: ruff format - run: ruff format
``` ```
@@ -108,7 +108,7 @@ you can use the `args` input to overwrite the default value (`check`):
```yaml ```yaml
- name: Install ruff without running check or format - name: Install ruff without running check or format
uses: astral-sh/ruff-action@v4.0.0 uses: astral-sh/ruff-action@v4.1.0
with: with:
args: "--version" args: "--version"
``` ```
@@ -116,7 +116,7 @@ you can use the `args` input to overwrite the default value (`check`):
### Use `ruff format` ### Use `ruff format`
```yaml ```yaml
- uses: astral-sh/ruff-action@v4.0.0 - uses: astral-sh/ruff-action@v4.1.0
with: with:
args: "format --check --diff" args: "format --check --diff"
``` ```
@@ -135,7 +135,7 @@ or no Ruff version is defined in `project.dependencies`, `project.optional-depen
```yaml ```yaml
- name: Install the latest version of ruff - name: Install the latest version of ruff
uses: astral-sh/ruff-action@v4.0.0 uses: astral-sh/ruff-action@v4.1.0
with: with:
version: "latest" version: "latest"
``` ```
@@ -144,7 +144,7 @@ or no Ruff version is defined in `project.dependencies`, `project.optional-depen
```yaml ```yaml
- name: Install a specific version of ruff - name: Install a specific version of ruff
uses: astral-sh/ruff-action@v4.0.0 uses: astral-sh/ruff-action@v4.1.0
with: with:
version: "0.4.4" version: "0.4.4"
``` ```
@@ -157,21 +157,21 @@ to install the latest version that satisfies the range.
```yaml ```yaml
- name: Install a semver range of ruff - name: Install a semver range of ruff
uses: astral-sh/ruff-action@v4.0.0 uses: astral-sh/ruff-action@v4.1.0
with: with:
version: ">=0.4.0" version: ">=0.4.0"
``` ```
```yaml ```yaml
- name: Pinning a minor version of ruff - name: Pinning a minor version of ruff
uses: astral-sh/ruff-action@v4.0.0 uses: astral-sh/ruff-action@v4.1.0
with: with:
version: "0.4.x" version: "0.4.x"
``` ```
```yaml ```yaml
- name: Install a pep440-specifier-satisfying version of ruff - name: Install a pep440-specifier-satisfying version of ruff
uses: astral-sh/ruff-action@v4.0.0 uses: astral-sh/ruff-action@v4.1.0
with: with:
version: ">=0.11.10,<0.12.0" version: ">=0.11.10,<0.12.0"
``` ```
@@ -184,7 +184,7 @@ be parsed or does not contain a Ruff version, the action warns and falls back to
```yaml ```yaml
- name: Install a version from a specified version file - name: Install a version from a specified version file
uses: astral-sh/ruff-action@v4.0.0 uses: astral-sh/ruff-action@v4.1.0
with: with:
version-file: "my-path/to/pyproject.toml-requirements.txt-or-uv.lock" version-file: "my-path/to/pyproject.toml-requirements.txt-or-uv.lock"
``` ```
@@ -203,7 +203,7 @@ This affects both version resolution and artifact selection.
```yaml ```yaml
- name: Install Ruff from a custom manifest - name: Install Ruff from a custom manifest
uses: astral-sh/ruff-action@v4.0.0 uses: astral-sh/ruff-action@v4.1.0
with: with:
version: "latest" version: "latest"
manifest-file: "https://example.com/ruff.ndjson" manifest-file: "https://example.com/ruff.ndjson"
@@ -217,7 +217,7 @@ are automatically verified by this action. The sha256 hashes can be found on the
```yaml ```yaml
- name: Install a specific version and validate the checksum - name: Install a specific version and validate the checksum
uses: astral-sh/ruff-action@v4.0.0 uses: astral-sh/ruff-action@v4.1.0
with: with:
version: "0.7.4" version: "0.7.4"
checksum: "0de731c669b9ece77e799ac3f4a160c30849752714d9775c94cc4cfaf326860c" checksum: "0de731c669b9ece77e799ac3f4a160c30849752714d9775c94cc4cfaf326860c"
@@ -239,7 +239,7 @@ are not sufficient, you can provide a custom GitHub token with the necessary per
```yaml ```yaml
- name: Install the latest version of ruff with a custom GitHub token - name: Install the latest version of ruff with a custom GitHub token
uses: astral-sh/ruff-action@v4.0.0 uses: astral-sh/ruff-action@v4.1.0
with: with:
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
``` ```