Skip to content

feat: added main build action #1

feat: added main build action

feat: added main build action #1

Workflow file for this run

name: Generate MQTT topics dev-build
on:
workflow_dispatch:
push:
branches:
- dev
jobs:
library:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Run generator
run: |
sudo apt-get install -y graphviz
pip install -r requirements.txt
python3 src/generator/main.py . out
mkdir -p /tmp/workspace
cp -R out/* /tmp/workspace
- uses: actions/checkout@v2
with:
ref: dev-build
- name: Push generated files
id: commit
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git rm -r --ignore-unmatch */*
rm -rf *
cp -r /tmp/workspace/* .
git add .
if [[ $(git status --porcelain) ]]; then git commit -am "chore: automatically generated files" && git push; fi
echo "::set-output name=HASH::$(git rev-parse HEAD)"