Update OpenAPI schemas #99
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: Copy OpenAPI schemas from main branch to dev branches | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '*-api/**.json' | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout front-api-specs repo | |
uses: actions/checkout@v3 | |
with: | |
path: ./front-api-specs | |
- name: copy core-api spec to dev branch | |
env: | |
TARGET_BRANCH: 'core-api' | |
run: | | |
cd ./front-api-specs | |
git config user.name github-actions | |
git config user.email [email protected] | |
git fetch | |
git push origin main:$TARGET_BRANCH -f | |
- name: copy channel-api spec to dev branch | |
env: | |
TARGET_BRANCH: 'channel-api' | |
run: | | |
cd ./front-api-specs | |
git config user.name github-actions | |
git config user.email [email protected] | |
git fetch | |
git push origin main:$TARGET_BRANCH -f |