| 1 |
name: Update Topic Repos |
| 2 |
|
| 3 |
on: |
| 4 |
schedule: |
| 5 |
- cron: "0 12 1 * *" |
| 6 |
workflow_dispatch: |
| 7 |
|
| 8 |
permissions: {} |
| 9 |
|
| 10 |
jobs: |
| 11 |
topic-repos: |
| 12 |
if: github.repository_owner == 'fastapi' |
| 13 |
runs-on: ubuntu-latest |
| 14 |
permissions: |
| 15 |
contents: write |
| 16 |
timeout-minutes: 5 |
| 17 |
steps: |
| 18 |
- name: Dump GitHub context |
| 19 |
env: |
| 20 |
GITHUB_CONTEXT: ${{ toJson(github) }} |
| 21 |
run: echo "$GITHUB_CONTEXT" |
| 22 |
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 23 |
with: |
| 24 |
persist-credentials: true # Required for `git push` in `topic_repos.py` |
| 25 |
- name: Set up Python |
| 26 |
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 |
| 27 |
with: |
| 28 |
python-version-file: ".python-version" |
| 29 |
- name: Setup uv |
| 30 |
uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0 |
| 31 |
with: |
| 32 |
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum. |
| 33 |
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837 |
| 34 |
version: "0.11.18" |
| 35 |
enable-cache: true |
| 36 |
cache-dependency-glob: | |
| 37 |
pyproject.toml |
| 38 |
uv.lock |
| 39 |
- name: Install GitHub Actions dependencies |
| 40 |
run: uv sync --locked --no-dev --group github-actions |
| 41 |
- name: Update Topic Repos |
| 42 |
run: uv run ./scripts/topic_repos.py |
| 43 |
env: |
| 44 |
GITHUB_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }} # zizmor: ignore[secrets-outside-env] |