1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-03-01 15:11:21 +01:00
immich/.github/workflows/openapi-generator.yml

41 lines
1.3 KiB
YAML
Raw Normal View History

2022-10-06 14:59:54 -05:00
name: Generate OpenAPI SDK
on:
workflow_dispatch:
2022-10-06 15:04:24 -05:00
pull_request:
2022-10-06 14:59:54 -05:00
push:
branches: [main]
jobs:
generate-typescript-axios:
runs-on: ubuntu-latest
2022-10-06 15:11:09 -05:00
name: OpenAPI Generator
2022-10-06 14:59:54 -05:00
steps:
# Checkout your code
- name: Checkout
uses: actions/checkout@v2
2022-10-06 15:21:17 -05:00
run: |
git config --global init.defaultBranch main
git config --global user.email "immichbot@immich.app"
git config --global user.name "Immich Bot"
2022-10-06 14:59:54 -05:00
# Use the action to generate a client package
# This uses the default path for the openapi document and thus assumes there is an openapi.json in the current workspace.
- name: Generate Typescript Axios Client
uses: openapi-generators/openapitools-generator-action@v1
with:
generator: typescript-axios
generator-tag: v6.2.0
openapi-file: server/immich-openapi-specs.json
# Do something with the generated client (likely publishing it somewhere)
- name: Do something with the client
run: |
2022-10-06 15:21:17 -05:00
cd typescript-axios-client
git init
git add .
git commit -m "Update SDK"
git remote add origin git@github.com:immich-app/typescript-axios-sdk.git
git pull origin main
git push origin main