Add trafficlight feedback #289
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: codegen | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
codegen-and-format: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./frontend | |
steps: | |
- uses: actions/checkout@v4 | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
token: ${{ secrets.MONDEY_FORMAT_BOT_PAT }} | |
- uses: actions/checkout@v4 | |
if: github.event.pull_request.head.repo.full_name != github.repository | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
cache-dependency-path: frontend/pnpm-lock.yaml | |
- name: "Export openapi.json from fastapi app" | |
run: | | |
cd ../mondey_backend | |
pip install . | |
mondey-export-openapi-json | |
- run: pnpm install | |
- name: "Generate frontend fetch API client code" | |
run: pnpm openapi-ts | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
add: "*" | |
author_name: "github-actions[bot]" | |
author_email: "github-actions[bot]@users.noreply.github.com" | |
message: "update openapi.json & openapi-ts client" |