Repository navigation
feat(api): Site wide token API #61436
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
| # Copyright © Michal Čihař <michal@weblate.org> | |
| # | |
| # SPDX-License-Identifier: CC0-1.0 | |
| # This file is maintained in https://github.com/WeblateOrg/meta/ | |
| name: Pre-commit check | |
| on: | |
| push: | |
| branches-ignore: | |
| - copilot/** | |
| - codex/** | |
| - renovate/** | |
| - weblate | |
| - weblate-* | |
| - weblate/** | |
| - dependabot/** | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-26.04-arm | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: $/.github/actions/pre-commit-setup | |
| - name: detect method | |
| id: detect | |
| run: | | |
| if test -f pyproject.toml ; then | |
| echo "method=pep735" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "method=uvx" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: pre-commit (PEP 735) | |
| if: steps.detect.outputs.method == 'pep735' | |
| run: | | |
| uv run --only-group pre-commit prek run --all-files --show-diff-on-failure | |
| du -h --max-depth=1 ~/.cache/prek ~/.cache/prek/cache ~/.cache/kingfisher || true | |
| env: | |
| RUFF_OUTPUT_FORMAT: github | |
| REUSE_OUTPUT_FORMAT: github | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: pre-commit (uvx) | |
| if: steps.detect.outputs.method == 'uvx' | |
| run: | | |
| uvx prek run --all-files --show-diff-on-failure | |
| du -h --max-depth=1 ~/.cache/prek ~/.cache/prek/cache ~/.cache/kingfisher || true | |
| env: | |
| RUFF_OUTPUT_FORMAT: github | |
| REUSE_OUTPUT_FORMAT: github | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: diff | |
| run: git diff | |
| if: always() | |
| - uses: pre-commit-ci/lite-action@062bca0919bc9d6e66755cc05074b70c77e111fc # v1.2.0 | |
| if: always() | |
| with: | |
| msg: 'chore(pre-commit): apply code formatting' |