From 2127ad130ebf9a176bc095f6833765077a1ba420 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 27 May 2025 10:22:53 +0200 Subject: [PATCH] Add normalize blanks --- .github/workflows/onpush_builder.yaml | 32 +++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/onpush_builder.yaml b/.github/workflows/onpush_builder.yaml index 15d15d3a0..86c8044d2 100644 --- a/.github/workflows/onpush_builder.yaml +++ b/.github/workflows/onpush_builder.yaml @@ -51,6 +51,7 @@ jobs: commit: -u message: "GitHub bot : scripts executable" default_author: github_actions + check-addon-changes: runs-on: ubuntu-latest needs: [correct_path_filters] @@ -99,9 +100,36 @@ jobs: message: "GitHub bot : scripts executable" default_author: github_actions + normalize-spaces: + if: ${{ needs.check-addon-changes.outputs.changedAddons != '[]' }} + needs: [check-addon-changes, make-executable, correct-CRLF] + runs-on: ubuntu-latest + strategy: + matrix: + addon: ${{ fromJSON(needs.check-addon-changes.outputs.changedAddons) }} + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - name: Normalize all non-breaking spaces to regular spaces + run: | + set -e + cd "${{ matrix.addon }}" + # Find all files (excluding .git) + find . -type f ! -path "./.git/*" | while read -r file; do + # Replace all non-breaking spaces (U+00A0) with ASCII space + LC_ALL=C sed -i 's/\xC2\xA0/ /g' "$file" + # Optionally, replace other weird unicode spaces if needed (can be added here) + done + - name: Commit if normalization was needed + uses: EndBug/add-and-commit@v9 + with: + commit: -u + message: "GitHub bot : normalize unicode spaces" + default_author: github_actions + lint_config: if: ${{ needs.check-addon-changes.outputs.changedAddons != '[]' }} - needs: check-addon-changes + needs: [check-addon-changes, normalize-spaces, correct-CRLF, make-executable, correct_path_filters] runs-on: ubuntu-latest strategy: matrix: @@ -116,7 +144,7 @@ jobs: build: if: ${{ needs.check-addon-changes.outputs.changedAddons != '[]' }} - needs: [check-addon-changes, make-executable, correct-CRLF] + needs: [check-addon-changes, lint_config] runs-on: ubuntu-latest environment: CR_PAT name: Build ${{ matrix.arch }} ${{ matrix.addon }} add-on