This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
Update OpenAPI spec #794
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update OpenAPI spec | |
on: | |
schedule: | |
# https://crontab.guru/every-night-at-midnight | |
- cron: "0 0 * * *" | |
jobs: | |
generate-openapi: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install poetry | |
poetry install | |
- name: "Export openapi specs from app" | |
run: poetry run python openapi.py > docs/openapi.json | |
- name: Update PR with new openapi version | |
uses: gr2m/create-or-update-pull-request-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
title: "📝 doc(openapi): Update OpenAPI specs" | |
branch: "doc/openapi-spec" | |
path: "docs/" | |
commit-message: "📝 doc(openapi): Update OpenAPI specs" | |
auto-merge: squash | |
body: "Update OpenAPI specifications based on auto-generated doc by fastapi" |