Use v4.0.0 in README.md (#371)

This change should reduce confusion from `@4` not working.
This commit is contained in:
Frederick Wagner
2026-05-20 07:18:52 -04:00
committed by GitHub
parent 8c228c72ff
commit 7f78e88b21
+15 -15
View File
@@ -43,13 +43,13 @@ By default, Ruff version metadata is resolved from the
### Basic ### Basic
```yaml ```yaml
- uses: astral-sh/ruff-action@v3 - uses: astral-sh/ruff-action@v4.0.0
``` ```
### Specify a different source directory ### Specify a different source directory
```yaml ```yaml
- uses: astral-sh/ruff-action@v3 - uses: astral-sh/ruff-action@v4.0.0
with: with:
src: "./src" src: "./src"
``` ```
@@ -57,7 +57,7 @@ By default, Ruff version metadata is resolved from the
### Specify multiple files ### Specify multiple files
```yaml ```yaml
- uses: astral-sh/ruff-action@v3 - uses: astral-sh/ruff-action@v4.0.0
with: with:
src: >- src: >-
path/to/file1.py path/to/file1.py
@@ -69,7 +69,7 @@ By default, Ruff version metadata is resolved from the
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@v3 - uses: astral-sh/ruff-action@v4.0.0
- run: ruff check --fix - run: ruff check --fix
- run: ruff format - run: ruff format
``` ```
@@ -80,7 +80,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@v3 uses: astral-sh/ruff-action@v4.0.0
with: with:
args: "--version" args: "--version"
``` ```
@@ -88,7 +88,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@v3 - uses: astral-sh/ruff-action@v4.0.0
with: with:
args: "format --check --diff" args: "format --check --diff"
``` ```
@@ -107,7 +107,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@v3 uses: astral-sh/ruff-action@v4.0.0
with: with:
version: "latest" version: "latest"
``` ```
@@ -116,7 +116,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@v3 uses: astral-sh/ruff-action@v4.0.0
with: with:
version: "0.4.4" version: "0.4.4"
``` ```
@@ -129,21 +129,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@v3 uses: astral-sh/ruff-action@v4.0.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@v3 uses: astral-sh/ruff-action@v4.0.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@v3 uses: astral-sh/ruff-action@v4.0.0
with: with:
version: ">=0.11.10,<0.12.0" version: ">=0.11.10,<0.12.0"
``` ```
@@ -156,7 +156,7 @@ or does not contain a Ruff version, the action warns and falls back to `latest`.
```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@v3 uses: astral-sh/ruff-action@v4.0.0
with: with:
version-file: "my-path/to/pyproject.toml-or-requirements.txt" version-file: "my-path/to/pyproject.toml-or-requirements.txt"
``` ```
@@ -175,7 +175,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@v3 uses: astral-sh/ruff-action@v4.0.0
with: with:
version: "latest" version: "latest"
manifest-file: "https://example.com/ruff.ndjson" manifest-file: "https://example.com/ruff.ndjson"
@@ -189,7 +189,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@v3 uses: astral-sh/ruff-action@v4.0.0
with: with:
version: "0.7.4" version: "0.7.4"
checksum: "0de731c669b9ece77e799ac3f4a160c30849752714d9775c94cc4cfaf326860c" checksum: "0de731c669b9ece77e799ac3f4a160c30849752714d9775c94cc4cfaf326860c"
@@ -209,7 +209,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@v3 uses: astral-sh/ruff-action@v4.0.0
with: with:
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
``` ```