Skip to content
Permalink
main
Switch branches/tags
View runs Go to file
 
 
Cannot retrieve contributors at this time
name: SDF to WoT TM Conversion
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
convert:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -q build
python -m build
pip install jsonschema jsonpointer json-merge-patch validators
pip install --no-index --find-links dist/ sdf-wot-converter
- name: Convert SDF models to WoT TM
run: ./convert_playground.sh
- name: Export conversion results
uses: actions/upload-artifact@v2
with:
name: WoT Thing Models
path: output/tm
- name: Push to playground results repo
run: |
git clone https://github.com/JKRhb/onedm-playground-wot-tm.git
rm -fR onedm-playground-wot-tm/tm
mv output/tm onedm-playground-wot-tm/tm
cd onedm-playground-wot-tm
if [[ `git status --porcelain` ]]; then
git config --global user.email "jan.romann@uni.bremen.de"
git config --global user.name "Jan Romann"
git commit -am "Update from JKRhb/sdf-wot-converter-py@${GITHUB_SHA}"
git remote set-url origin https://JKRhb:${{ secrets.API_TOKEN_GITHUB }}@github.com/JKRhb/onedm-playground-wot-tm.git
git push origin main
fi
if: ${{ github.ref == 'refs/heads/main' && github.repository == 'JKRhb/sdf-wot-converter-py' }}