2022-12-02 18:38:54 +03:00
|
|
|
name: QML Label component check
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
|
|
build:
|
2023-09-25 12:19:22 +03:00
|
|
|
name: QML Label component check
|
2022-12-02 18:38:54 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-10-25 12:25:03 +03:00
|
|
|
- uses: actions/checkout@v4
|
2022-12-02 18:38:54 +03:00
|
|
|
- name: Run label component count
|
|
|
|
run: |
|
2022-12-05 18:06:15 +03:00
|
|
|
MATCHESRESULT=$(find . -iname "*.qml" | xargs grep -r -e "^\s*Label\s*[{]" | wc -l | sed "s/ //g")
|
2022-12-02 18:38:54 +03:00
|
|
|
echo "MATCHES=${MATCHESRESULT}" >> $GITHUB_ENV
|
|
|
|
echo "EXPECTED_MATCHES=1" >> $GITHUB_ENV
|
|
|
|
- name: Check label component use count
|
|
|
|
if: env.MATCHES != env.EXPECTED_MATCHES
|
2023-09-26 02:37:42 +03:00
|
|
|
uses: actions/github-script@v6
|
2022-12-02 18:38:54 +03:00
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
core.setFailed('Using QML Labels! Make sure to use EnforcedPlainTextLabel instead!')
|