ci/github-actions: update ruff job to handle specific refs
- Set fetch-depth to 0 to fetch the entire history - Add ref input to checkout specific branch or tag
This commit is contained in:
3
.github/workflows/ruff.yml
vendored
3
.github/workflows/ruff.yml
vendored
@@ -9,6 +9,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: ${{ github.head_ref || github.ref_name }}
|
||||||
- uses: astral-sh/ruff-action@v3
|
- uses: astral-sh/ruff-action@v3
|
||||||
- run: ruff check --fix
|
- run: ruff check --fix
|
||||||
- run: ruff format
|
- run: ruff format
|
||||||
|
|||||||
Reference in New Issue
Block a user