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
pull/747/head
ChangingSelf 2025-04-13 21:07:53 +08:00
parent 65a6062cf4
commit 99b755f424
1 changed files with 3 additions and 0 deletions

View File

@ -9,6 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref || github.ref_name }}
- uses: astral-sh/ruff-action@v3
- run: ruff check --fix
- run: ruff format