mirror of https://github.com/tiangolo/fastapi.git
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: Label Approved
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 12 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
label-approved:
|
|
if: github.repository_owner == 'fastapi'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
pull-requests: 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: false
|
|
- 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 GitHub Actions dependencies
|
|
run: uv sync --locked --no-dev --group github-actions
|
|
- name: Label Approved
|
|
run: uv run ./scripts/label_approved.py
|
|
env:
|
|
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
CONFIG: >
|
|
{
|
|
"approved-1":
|
|
{
|
|
"number": 1,
|
|
"await_label": "awaiting-review"
|
|
}
|
|
}
|