Skip to content

Minor changes

Minor changes #3

Workflow file for this run

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@20-lowest-level-elements-in-xml-cannot-have-attributes-and-content
- name: Generate API
env:
URL: ${{github.repositoryUrl}}
COMMIT: ${{github.sha}}
run: sdrdm generate --path ./specifications/ --out . --name "$LIB_NAME" --url "$URL" --commit "$COMMIT"
- name: Push source code
run: |
if [[ `git status --porcelain` ]]; then
git add "$LIB_NAME"
git config --global user.name 'sdRDM Bot'
git config --global user.email 'sdRDM@bot.com'
git commit -am "API update"
git push
else
echo "Nothing changed!"
fi