nextcloud-desktop/.github/workflows/qml-label-check.yml
dependabot[bot] bb9b62f00c Build(deps): Bump actions/github-script from 6 to 7
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-05 08:51:23 +01:00

21 lines
756 B
YAML

name: QML Label component check
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: QML Label component check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run label component count
run: |
MATCHESRESULT=$(find . -iname "*.qml" | xargs grep -r -e "^\s*Label\s*[{]" | wc -l | sed "s/ //g")
echo "MATCHES=${MATCHESRESULT}" >> $GITHUB_ENV
echo "EXPECTED_MATCHES=1" >> $GITHUB_ENV
- name: Check label component use count
if: env.MATCHES != env.EXPECTED_MATCHES
uses: actions/github-script@v7
with:
script: |
core.setFailed('Using QML Labels! Make sure to use EnforcedPlainTextLabel instead!')