-
Notifications
You must be signed in to change notification settings - Fork 10
38 lines (32 loc) · 1.05 KB
/
generate_api.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Generate API
on: push
jobs:
generate-api:
runs-on: ubuntu-latest
env:
LIB_NAME: ${{ secrets.LIB_NAME }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install sdRDM
run: python3 -m pip install git+https://github.com/JR-1991/software-driven-rdm.git@linking-refactor
- name: Generate API
env:
URL: ${{github.repositoryUrl}}
COMMIT: ${{github.sha}}
run: sdrdm generate --path ./specifications/ --out ./nmrpy/ --name "datamodel" --url "$URL" --commit "$COMMIT"
- name: Push source code
run: |
if [[ `git status --porcelain` ]]; then
git add "datamodel"
git config --global user.name 'sdRDM Bot'
git config --global user.email '[email protected]'
git commit -am "API update"
git push
else
echo "Nothing changed!"
fi