-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
420 additions
and
179 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
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)" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
name: Generate MQTT topics | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
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: 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)" | ||
name: Generate MQTT topics build | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
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: 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)" |
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
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
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
Oops, something went wrong.