@@ -12,46 +12,50 @@ jobs:
1212 if : github.repository_owner == 'fastapi'
1313 runs-on : ubuntu-latest
1414 timeout-minutes : 10
15+ permissions :
16+ contents : read
17+ id-token : write
1518 steps :
1619 - name : Dump GitHub context
1720 env :
1821 GITHUB_CONTEXT : ${{ toJson(github) }}
1922 run : echo "$GITHUB_CONTEXT"
20- - uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
23+ - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2124 with :
22- token : ${{ secrets.SQLMODEL_LATEST_CHANGES }}
23- persist-credentials : true
25+ persist-credentials : false
2426 - name : Set up Python
25- uses : actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3 .0
27+ uses : actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0 .0
2628 with :
2729 python-version-file : " .python-version"
2830 - name : Setup uv
29- uses : astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
31+ uses : astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
3032 with :
31- # Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
32- # See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
33- version : " 0.11.18"
33+ version : " latest-known"
3434 cache-dependency-glob : |
3535 pyproject.toml
3636 uv.lock
3737 - name : Bump pre-commit hooks
3838 run : uv run prek auto-update --freeze --cooldown-days 7
39+ - name : Get PR Submit token
40+ id : pr-submit
41+ uses : tiangolo/pr-submit@d802fdf59bde80bc3eb8bd3259f4cbeec63de4aa # 0.0.1
3942 - name : Create pull request
4043 env :
41- GH_TOKEN : ${{ secrets.SQLMODEL_LATEST_CHANGES }}
44+ GH_TOKEN : ${{ steps.pr-submit.outputs.token }}
4245 BASE_BRANCH : ${{ github.event.repository.default_branch }}
4346 run : |
4447 set -euo pipefail
4548 if git diff --quiet; then
4649 echo "No pre-commit hook updates available"
4750 exit 0
4851 fi
49- git config user.name "github-actions [bot]"
50- git config user.email "github-actions [bot]@users.noreply.github.com"
52+ git config user.name "pr-submit [bot]"
53+ git config user.email "pr-submit [bot]@users.noreply.github.com"
5154 branch="bump-pre-commit-hooks"
5255 git switch -C "$branch"
5356 git add .pre-commit-config.yaml
5457 git commit -m "⬆ Bump pre-commit hooks"
58+ gh auth setup-git
5559 git push --force origin "$branch"
5660 if [ -z "$(gh pr list --head "$branch" --state open --json number --jq '.[].number')" ]; then
5761 gh pr create \
0 commit comments