2022-04-08 15:38:58 +02:00
|
|
|
name: Push API schema
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
generate:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-python@v3
|
2022-04-08 15:54:00 +02:00
|
|
|
|
2022-04-08 15:38:58 +02:00
|
|
|
- name: Clone api-client repo
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: "${{ github.repository_owner }}/api-client"
|
|
|
|
path: api-client-repo
|
|
|
|
ssh-key: "${{ secrets.API_CLIENT_DEPLOY_KEY }}"
|
2022-04-08 15:54:00 +02:00
|
|
|
|
2022-04-08 15:38:58 +02:00
|
|
|
- name: Generate schema
|
|
|
|
run: |
|
|
|
|
make schema
|
|
|
|
cp schema.yml ../api-client-repo/schema.yml
|
|
|
|
working-directory: api
|
2022-04-08 15:54:00 +02:00
|
|
|
|
2022-04-08 15:38:58 +02:00
|
|
|
- name: Push schema changes to API clients
|
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
2022-04-08 15:54:00 +02:00
|
|
|
commit_message: "chore: update schema for ${{ github.repository }}@${{ github.sha }}"
|
2022-04-08 15:38:58 +02:00
|
|
|
repository: ./api-client-repo
|