From 7f3955f7c016d6cb34b3dfc1d80e1ca598f28c05 Mon Sep 17 00:00:00 2001 From: aptalca Date: Mon, 12 Dec 2022 21:22:48 -0500 Subject: [PATCH] create action for executable bit check for run/finish --- .../init-svc-executable-permissions.yml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/init-svc-executable-permissions.yml diff --git a/.github/workflows/init-svc-executable-permissions.yml b/.github/workflows/init-svc-executable-permissions.yml new file mode 100644 index 0000000..12cfdf4 --- /dev/null +++ b/.github/workflows/init-svc-executable-permissions.yml @@ -0,0 +1,22 @@ +name: Permission check +on: + workflow_call: + +jobs: + permission_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3.1.0 + with: + 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) + 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!" + done + exit 1 + else + echo "**** All perms look good ****" + fi