From 61a978d26175098df70f09238adf8869d5af93ad Mon Sep 17 00:00:00 2001 From: Jess Bees Date: Tue, 8 Nov 2022 10:33:02 -0500 Subject: [PATCH] Send a workflow warning when changing file permissions --- action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 1369ae1..7c74026 100644 --- a/action.yml +++ b/action.yml @@ -17,7 +17,10 @@ runs: shell: sh if: runner.os == 'Linux' run: | - chmod -R +r . + for f in $(chmod -c -R +r . | awk '{print substr($3, 2, length($3)-2)}') + do + echo "::warning::Added read permission to $f" + done tar \ --dereference --hard-dereference \ --directory "$INPUT_PATH" \ @@ -33,7 +36,10 @@ runs: shell: sh if: runner.os == 'macOS' run: | - chmod -R +r . + for f in $(gchmod -c -R +r . | awk '{print substr($3, 2, length($3)-2)}') + do + echo "::warning::Added read permission to $f" + done gtar \ --dereference --hard-dereference \ --directory "$INPUT_PATH" \