From 0ab04b62450942acd7dc1c32ebe7c30aed47d467 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:29:17 -0400 Subject: [PATCH] combine find commands, exclude .git folder --- .github/workflows/init-svc-executable-permissions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/init-svc-executable-permissions.yml b/.github/workflows/init-svc-executable-permissions.yml index 3cd1729..5cee0f5 100644 --- a/.github/workflows/init-svc-executable-permissions.yml +++ b/.github/workflows/init-svc-executable-permissions.yml @@ -11,7 +11,7 @@ jobs: fetch-depth: '0' - name: Check Permissions run: | - WRONG_PERM=$(find ./ -name run -not -perm -u=x,g=x,o=x && find ./ -name finish -not -perm -u=x,g=x,o=x && find ./ -name check -not -perm -u=x,g=x,o=x) + WRONG_PERM=$(find ./ -path "./.git" -prune -o \( -name "run" -o -name "service" -o -name "check" \) -not -perm -u=x,g=x,o=x -print) if [ -n "${WRONG_PERM}" ]; then for i in ${WRONG_PERM}; do echo "::error file=${i},line=1,title=Missing Executable Bit::This file needs to be set as executable!"