11 configure cicd #43
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-api-schema | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | |
push: | |
branches: [main] | |
jobs: | |
gen-openapi: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
persist-credentials: false | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: run | |
args: -p bob_management --bin gen-openapi --features "swagger gen_api backend" --no-default-features | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: API schemas | |
path: api/* | |
- name: "Update API schema" | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "Autogenerate API" |