mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use ruff-action's version detection (#13286)
This commit is contained in:
parent
0d4425ce07
commit
d0107ab02c
7
.github/workflows/lint.yml
vendored
7
.github/workflows/lint.yml
vendored
@ -26,16 +26,11 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Get Ruff version from pyproject.toml
|
|
||||||
run: |
|
|
||||||
RUFF_VERSION=$(awk -F'[="]' '/\[project\.optional-dependencies\]/ {p=1} /ruff/ {if (p) print $4}' pyproject.toml)
|
|
||||||
echo "RUFF_VERSION=$RUFF_VERSION" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Install Ruff ${{ env.RUFF_VERSION }}
|
- name: Install Ruff
|
||||||
uses: astral-sh/ruff-action@v3
|
uses: astral-sh/ruff-action@v3
|
||||||
with:
|
with:
|
||||||
args: --version
|
args: --version
|
||||||
version: ${{ env.RUFF_VERSION }}
|
|
||||||
|
|
||||||
- name: Lint with Ruff
|
- name: Lint with Ruff
|
||||||
run: ruff check --output-format=github
|
run: ruff check --output-format=github
|
||||||
|
Loading…
Reference in New Issue
Block a user