mirror of https://github.com/tiangolo/fastapi.git
54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
name: FastAPI People Sponsors
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 6 1 * *"
|
|
workflow_dispatch:
|
|
inputs:
|
|
debug_enabled:
|
|
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
|
|
required: false
|
|
default: "false"
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
job:
|
|
if: github.repository_owner == 'fastapi'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Dump GitHub context
|
|
env:
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
run: echo "$GITHUB_CONTEXT"
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: true # Required for `git push` in `sponsors.py`
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version-file: ".python-version"
|
|
- name: Setup uv
|
|
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
|
with:
|
|
version: "0.11.4"
|
|
enable-cache: true
|
|
cache-dependency-glob: |
|
|
pyproject.toml
|
|
uv.lock
|
|
- name: Install Dependencies
|
|
run: uv sync --locked --no-dev --group github-actions
|
|
# Allow debugging with tmate
|
|
- name: Setup tmate session
|
|
uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3.23
|
|
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
|
|
with:
|
|
limit-access-to-actor: true
|
|
- name: FastAPI People Sponsors
|
|
run: uv run ./scripts/sponsors.py
|
|
env:
|
|
SPONSORS_TOKEN: ${{ secrets.SPONSORS_TOKEN }} # zizmor: ignore[secrets-outside-env]
|
|
PR_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }} # zizmor: ignore[secrets-outside-env]
|