Send a workflow warning when changing file permissions

This commit is contained in:
Jess Bees
2022-11-08 10:33:02 -05:00
parent 3cb2c0f93b
commit 61a978d261

View File

@@ -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" \