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
```yaml
- uses: astral-sh/ruff-action@v4.0.0
- uses: astral-sh/ruff-action@v4.1.0
```
### Specify a different source directory
```yaml
- uses: astral-sh/ruff-action@v4.0.0
- uses: astral-sh/ruff-action@v4.1.0
with:
src: "./src"
```
@@ -60,7 +60,7 @@ By default, Ruff version metadata is resolved from the
Separate multiple `src` values with whitespace.
```yaml
- uses: astral-sh/ruff-action@v4.0.0
- uses: astral-sh/ruff-action@v4.1.0
with:
src: >-
path/to/file1.py
@@ -81,7 +81,7 @@ path. Literal glob metacharacters in file or directory names must be escaped
using `@actions/glob` syntax.
```yaml
- uses: astral-sh/ruff-action@v3
- uses: astral-sh/ruff-action@v4.1.0
with:
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.
```yaml
- uses: astral-sh/ruff-action@v4.0.0
- uses: astral-sh/ruff-action@v4.1.0
- run: ruff check --fix
- run: ruff format
```
@@ -108,7 +108,7 @@ you can use the `args` input to overwrite the default value (`check`):
```yaml
- 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:
args: "--version"
```
@@ -116,7 +116,7 @@ you can use the `args` input to overwrite the default value (`check`):
### Use `ruff format`
```yaml
- uses: astral-sh/ruff-action@v4.0.0
- uses: astral-sh/ruff-action@v4.1.0
with:
args: "format --check --diff"
```
@@ -135,7 +135,7 @@ or no Ruff version is defined in `project.dependencies`, `project.optional-depen
```yaml
- name: Install the latest version of ruff
uses: astral-sh/ruff-action@v4.0.0
uses: astral-sh/ruff-action@v4.1.0
with:
version: "latest"
```
@@ -144,7 +144,7 @@ or no Ruff version is defined in `project.dependencies`, `project.optional-depen
```yaml
- name: Install a specific version of ruff
uses: astral-sh/ruff-action@v4.0.0
uses: astral-sh/ruff-action@v4.1.0
with:
version: "0.4.4"
```
@@ -157,21 +157,21 @@ to install the latest version that satisfies the range.
```yaml
- name: Install a semver range of ruff
uses: astral-sh/ruff-action@v4.0.0
uses: astral-sh/ruff-action@v4.1.0
with:
version: ">=0.4.0"
```
```yaml
- name: Pinning a minor version of ruff
uses: astral-sh/ruff-action@v4.0.0
uses: astral-sh/ruff-action@v4.1.0
with:
version: "0.4.x"
```
```yaml
- 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:
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
- 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:
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
- name: Install Ruff from a custom manifest
uses: astral-sh/ruff-action@v4.0.0
uses: astral-sh/ruff-action@v4.1.0
with:
version: "latest"
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
- 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:
version: "0.7.4"
checksum: "0de731c669b9ece77e799ac3f4a160c30849752714d9775c94cc4cfaf326860c"
@@ -239,7 +239,7 @@ are not sufficient, you can provide a custom GitHub token with the necessary per
```yaml
- 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:
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
```