mirror of
https://github.com/fastapi/fastapi.git
synced 2026-09-14 13:36:21 +08:00
65 lines
2.1 KiB
YAML
65 lines
2.1 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: {}
|
|
|
|
env:
|
|
UV_NO_SYNC: true
|
|
|
|
jobs:
|
|
job:
|
|
if: github.repository_owner == 'fastapi'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
timeout-minutes: 5
|
|
steps:
|
|
- name: Dump GitHub context
|
|
env:
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
run: echo "$GITHUB_CONTEXT"
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up Python
|
|
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
with:
|
|
python-version-file: ".python-version"
|
|
- name: Setup uv
|
|
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
with:
|
|
version: "latest-known"
|
|
enable-cache: true
|
|
cache-suffix: github-actions
|
|
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@35b54afac29c97fb54faba5b513f8fbd1882f113 # v3.24
|
|
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
|
|
with:
|
|
limit-access-to-actor: true
|
|
- name: Get PR Submit token
|
|
id: pr-submit
|
|
uses: tiangolo/pr-submit@d802fdf59bde80bc3eb8bd3259f4cbeec63de4aa # 0.0.1
|
|
- name: FastAPI People Sponsors
|
|
run: |
|
|
gh auth setup-git
|
|
uv run ./scripts/sponsors.py
|
|
env:
|
|
SPONSORS_TOKEN: ${{ secrets.SPONSORS_TOKEN }} # zizmor: ignore[secrets-outside-env]
|
|
GITHUB_TOKEN: ${{ steps.pr-submit.outputs.token }}
|