Skip to content

Commit 6e866d0

Browse files
authored
Merge pull request #64 from actions/file-perms-error-docs
Add file perms handling
2 parents 66b63f4 + a3f792f commit 6e866d0

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,38 @@ The [`tar` file][tar] must:
2626
- be under 10GB in size
2727
- not contain any symbolic or hard links
2828

29+
# File Permissions
30+
31+
When using this action ensure your files have appropriate file permission, we expect at a minimum for the files to have permission for the current user (e.g 0744).
32+
Failure to do so will result in a `deployment_perms_error` when attempting to deploy your artifacts.
33+
34+
```yaml
35+
...
36+
runs:
37+
using: composite
38+
steps:
39+
- name: Archive artifact
40+
shell: sh
41+
if: runner.os == 'Linux'
42+
run: |
43+
chmod -c -R +rX "$INPUT_PATH" |
44+
while read line; do
45+
echo "::warning title=Invalid file permissions automatically fixed::$line"
46+
done
47+
tar \
48+
--dereference --hard-dereference \
49+
--directory "$INPUT_PATH" \
50+
-cvf "$RUNNER_TEMP/artifact.tar" \
51+
--exclude=.git \
52+
--exclude=.github \
53+
.
54+
env:
55+
INPUT_PATH: ${{ inputs.path }}
56+
57+
...
58+
```
59+
60+
2961
# Release instructions
3062

3163
In order to release a new version of this Action:

0 commit comments

Comments
 (0)