ci: scope permissions to jobs and fix workflow syntax #2453
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Ruff Code Formatter and Linting Check | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| lint: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| checks: write | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.13" | |
| - name: Ruff Format Check | |
| uses: chartboost/ruff-action@e18ae971ccee1b2d7bbef113930f00c670b78da4 # v1.0.0 | |
| with: | |
| version: 0.14.0 | |
| args: "format --check" | |
| - name: Ruff Lint Check | |
| uses: chartboost/ruff-action@e18ae971ccee1b2d7bbef113930f00c670b78da4 # v1.0.0 | |
| with: | |
| version: 0.14.0 | |
| args: "check" |