mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-19 22:24:15 +01:00
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4 to 5. - [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases) - [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4...v5) --- updated-dependencies: - dependency-name: stefanzweifel/git-auto-commit-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
87 lines
3.6 KiB
YAML
87 lines
3.6 KiB
YAML
name: nextion2text
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- HMI/nspanel.HMI
|
|
- HMI/US/portrait/nspanel_US_P.HMI
|
|
- HMI/US/portrait/diff-ignore/cardEntities.txt
|
|
- HMI/US/landscape/nspanel_US_L.HMI
|
|
- .github/workflows/nextion2text.yml
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- HMI/nspanel.HMI
|
|
- HMI/US/portrait/nspanel_US_P.HMI
|
|
- HMI/US/portrait/diff-ignore/cardEntities.txt
|
|
- HMI/US/landscape/nspanel_US_L.HMI
|
|
- .github/workflows/nextion2text.yml
|
|
|
|
jobs:
|
|
gen-nextion-to-text:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
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: Download n2t
|
|
continue-on-error: true
|
|
run: |
|
|
wget https://raw.githubusercontent.com/joBr99/Nextion2Text/master/linux/Nextion2Text.py && sudo apt update && sudo apt install -y diffoscope
|
|
|
|
- name: Run n2t EU
|
|
continue-on-error: true
|
|
run: |
|
|
python Nextion2Text.py -s -d -p -p visual -i HMI/nspanel.HMI -o HMI/n2t-out-visual
|
|
|
|
- name: Run n2t US
|
|
continue-on-error: true
|
|
run: |
|
|
python Nextion2Text.py -s -d -p -p visual -i HMI/US/portrait/nspanel_US_P.HMI -o HMI/US/portrait/n2t-out-visual
|
|
python Nextion2Text.py -s -d -p -p visual -i HMI/US/landscape/nspanel_US_L.HMI -o HMI/US/landscape/n2t-out-visual
|
|
|
|
- name: Run n2t US P DIFF
|
|
continue-on-error: true
|
|
run: |
|
|
echo "YXR0cmlidXRlcyA9IHsKICAgICJpZCI6IHsKICAgICAgICAiaWdub3JlIjogVHJ1ZSwKICAgICAgICAibmFtZSI6ICJJRCIsCiAgICAgICAgInN0cnVjdCI6ICJpIiwKICAgIH0sCiAgICAiZGlzdXAiOiB7CiAgICAgICAgImlnbm9yZSI6IFRydWUsCiAgICAgICAgIm5hbWUiOiAiRGlzYWJsZSByZWxlYXNlIGV2ZW50IGFmdGVyIGRyYWdnaW5nIiwKICAgICAgICAic3RydWN0IjogImkiLAogICAgfSwKfQ==" | base64 -d > ignore-id.py
|
|
python Nextion2Text.py -c ignore-id.py -p font -d -i HMI/nspanel.HMI -o HMI/n2t-out
|
|
|
|
echo portrait
|
|
python Nextion2Text.py -c ignore-id.py -p font -d -i HMI/US/portrait/nspanel_US_P.HMI -o HMI/US/portrait/n2t-out
|
|
diffoscope --exclude=pageTest.txt --exclude-directory-metadata=recursive HMI/n2t-out HMI/US/portrait/n2t-out > HMI/US/portrait/diff-eu-version.txt
|
|
#diff -bur HMI/n2t-out HMI/US/portrait/n2t-out > HMI/US/portrait/diff-eu-version.txt
|
|
|
|
- name: Run n2t US P DIFF DIFF
|
|
continue-on-error: true
|
|
run: |
|
|
diff -u <(cut -b13- HMI/US/portrait/diff-eu-version-known-good.txt) <(cut -b13- HMI/US/portrait/diff-eu-version.txt) | grep -E "^\+" > HMI/US/portrait/diff-filtered.txt
|
|
#diff -u HMI/US/portrait/diff-eu-version-known-good.txt | grep -E "^\+" > HMI/US/portrait/diff-filtered.txt
|
|
|
|
- name: Run n2t US L DIFF
|
|
continue-on-error: true
|
|
run: |
|
|
echo landscape
|
|
python Nextion2Text.py -c ignore-id.py -p font -d -i HMI/US/landscape/nspanel_US_L.HMI -o HMI/US/landscape/n2t-out
|
|
#diff -bur HMI/n2t-out HMI/US/landscape/n2t-out > HMI/US/landscape/diff-eu-version.txt
|
|
diffoscope --exclude=pageTest.txt --exclude-directory-metadata=recursive HMI/n2t-out HMI/US/landscape/n2t-out > HMI/US/landscape/diff-eu-version.txt
|
|
|
|
- name: Display txt files
|
|
continue-on-error: true
|
|
run: |
|
|
find -name "**.txt"
|
|
rm Nextion2Text.py* ignore-id.py out.txt
|
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v5
|
|
with:
|
|
commit_message: ${{ steps.last-commit-message.outputs.msg }} (add nextion2text)
|
|
#file_pattern: "**.txt"
|