Files
nspanel-lovelace-ui/.github/workflows/nextion2text.yml
2022-03-29 08:39:07 +02:00

45 lines
1.2 KiB
YAML

name: nextion2text
on:
pull_request:
paths:
- HMI/nspanel.HMI
- HMI/US/portrait/nspanel_US_P.HMI
push:
branches:
- main
paths:
- HMI/nspanel.HMI
- HMI/US/portrait/nspanel_US_P.HMI
jobs:
gen-nextion-to-text:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Get last commit message
id: last-commit-message
run: |
echo "::set-output name=msg::$(git log -1 --pretty=%s)"
- name: Run nextion2text
run: |
wget https://raw.githubusercontent.com/joBr99/Nextion2Text/linux/Nextion2Text.py
python Nextion2Text.py -s -d -p visual -i HMI/nspanel.HMI -o HMI/n2t-out-visual
python Nextion2Text.py -s -d -i HMI/nspanel.HMI -o HMI/n2t-out
python Nextion2Text.py -s -d -i HMI/US/portrait/nspanel_US_P.HMI -o HMI/US/portrait/n2t-out
diff -bur HMI/US/portrait/n2t-out HMI/n2t-out > HMI/US/portrait/diff-eu-version.txt
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: ${{ steps.last-commit-message.outputs.msg }} (add nextion2text)
file_pattern: HMI/n2t-out/*.txt