]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
👷 Add workflow for FastAPI People Contributors
authorSebastián Ramírez <tiangolo@gmail.com>
Wed, 1 Jan 2025 21:48:12 +0000 (21:48 +0000)
committerSebastián Ramírez <tiangolo@gmail.com>
Wed, 1 Jan 2025 21:48:12 +0000 (21:48 +0000)
.github/workflows/contributors.yml [new file with mode: 0644]

diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml
new file mode 100644 (file)
index 0000000..f569600
--- /dev/null
@@ -0,0 +1,48 @@
+name: FastAPI People Contributors
+
+on:
+  schedule:
+    - cron: "0 3 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'
+  # TODO: fix this
+  pull_request:
+
+jobs:
+  job:
+    if: github.repository_owner == 'fastapi'
+    runs-on: ubuntu-latest
+    steps:
+      - name: Dump GitHub context
+        env:
+          GITHUB_CONTEXT: ${{ toJson(github) }}
+        run: echo "$GITHUB_CONTEXT"
+      - uses: actions/checkout@v4
+      # Allow debugging with tmate
+      - name: Setup tmate session
+        uses: mxschmitt/action-tmate@v3
+        if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
+        with:
+          limit-access-to-actor: true
+      - name: Set up Python
+        uses: actions/setup-python@v5
+        with:
+          python-version: "3.11"
+      - name: Setup uv
+        uses: astral-sh/setup-uv@v5
+        with:
+          version: "0.4.15"
+          enable-cache: true
+          cache-dependency-glob: |
+            requirements**.txt
+            pyproject.toml
+      - name: Install Dependencies
+        run: uv pip install -r requirements-github-actions.txt
+      - name: FastAPI People Contributors
+        run: python ./scripts/contributors.py
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}