From 7b1c4cfe58fead1e2b6079f367b324802df0bb25 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:56:13 +0200 Subject: [PATCH] Update onpush_superlinter.yml --- .github/workflows/onpush_superlinter.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/onpush_superlinter.yml b/.github/workflows/onpush_superlinter.yml index 850065077..dc0ee547f 100644 --- a/.github/workflows/onpush_superlinter.yml +++ b/.github/workflows/onpush_superlinter.yml @@ -21,10 +21,9 @@ jobs: - name: Run script file id: chmod run: | - # shellcheck disable=SC2086,SC2046,SC2044 - for f in $(find . -name '*.sh' -o -regex './s?bin/[^/]+' -o -regex './usr/sbin/[^/]+' -o -regex './usr/lib/[^/]+'); do - ( cd "$(dirname $f)" && git update-index --chmod=+x "$(basename $f)" ) - done + git ls-files --stage | grep ".sh$" | cut -f2 | xargs -d '\n' git update-index --chmod=+x && \ + git grep --files-with-matches 'bash' | cut -f2 | xargs -d '\n' git update-index --chmod=+x && \ + git commit -m "Changing file permissions" shell: bash - name: Commit if needed if: steps.sort.outputs.changed != ''