diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2023-05-12 15:08:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 15:08:03 +0200 |
commit | 2ac4e3bb30517998916bb6b81b7b76788276038c (patch) | |
tree | 245bf4614ff38f3b0fcac813c1dde8c39b57732d /.github/workflows | |
parent | fdf66b3472e5ca254a4f90c32f26c4702d46828b (diff) | |
parent | fa8b32cbd4503e73a840bd1a1dd32d2a88cc3f45 (diff) |
Merge pull request #76998 from akien-mga/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.3) - 4th batch
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/static_checks.yml | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/.github/workflows/static_checks.yml b/.github/workflows/static_checks.yml index 8dc5e0fbff..84066808c1 100644 --- a/.github/workflows/static_checks.yml +++ b/.github/workflows/static_checks.yml @@ -28,14 +28,18 @@ jobs: - name: Get changed files id: changed-files + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | if [ "${{ github.event_name }}" == "pull_request" ]; then - files=$(git diff-tree --no-commit-id --name-only -r ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} 2> /dev/null || true) + files=$(gh pr diff ${{ github.event.pull_request.number }} --name-only) elif [ "${{ github.event_name }}" == "push" -a "${{ github.event.forced }}" == "false" -a "${{ github.event.created }}" == "false" ]; then files=$(git diff-tree --no-commit-id --name-only -r ${{ github.event.before }}..${{ github.event.after }} 2> /dev/null || true) fi echo "$files" >> changed.txt cat changed.txt + files=$(echo "$files" | grep -v 'thirdparty' | xargs -I {} sh -c 'echo "./{}"' | tr '\n' ' ') + echo "CHANGED_FILES=$files" >> $GITHUB_ENV - name: File formatting checks (file_format.sh) run: | @@ -98,9 +102,9 @@ jobs: fi - name: Spell checks via codespell + if: github.event_name == 'pull_request' && env.CHANGED_FILES != '' uses: codespell-project/actions-codespell@v1 with: - skip: ./.*,./**/.*,./bin,./thirdparty,*.desktop,*.gen.*,*.po,*.pot,*.rc,./AUTHORS.md,./COPYRIGHT.txt,./DONORS.md,./core/input/gamecontrollerdb.txt,./core/string/locales.h,./editor/project_converter_3_to_4.cpp,./misc/scripts/codespell.sh,./platform/android/java/lib/src/com,./platform/web/node_modules,./platform/web/package-lock.json - check_hidden: false - ignore_words_list: curvelinear,doubleclick,expct,findn,gird,hel,inout,lod,nd,numer,ot,te - only_warn: true + skip: "./bin,./thirdparty,*.desktop,*.gen.*,*.po,*.pot,*.rc,./AUTHORS.md,./COPYRIGHT.txt,./DONORS.md,./core/input/gamecontrollerdb.txt,./core/string/locales.h,./editor/project_converter_3_to_4.cpp,./misc/scripts/codespell.sh,./platform/android/java/lib/src/com,./platform/web/node_modules,./platform/web/package-lock.json" + ignore_words_list: "curvelinear,doubleclick,expct,findn,gird,hel,inout,lod,nd,numer,ot,te,vai" + path: ${{ env.CHANGED_FILES }} |