9 Commits

Author SHA1 Message Date
James M. Greene
84bb4cd4b7 Merge pull request #65 from tshepang/patch-1
readme: fix/improve note about permissions
2023-07-10 11:49:41 -05:00
James M. Greene
8f17ae6041 Update README.md 2023-07-10 11:48:50 -05:00
James M. Greene
bc7aff665b Update README.md 2023-07-10 11:48:45 -05:00
James M. Greene
6327a23a11 Merge branch 'main' into patch-1 2023-07-10 11:35:16 -05:00
James M. Greene
81e1caf958 Merge pull request #68 from actions/revert-chmod-for-v1
Revert `chmod` removal for `v1`
2023-07-10 11:26:08 -05:00
James M. Greene
75e09bde99 Revert PR #63
It represents a breaking change that we should move into a v2.0.0 release
2023-07-10 10:54:54 -05:00
Tshepang Mbambo
74d0f02a66 readme: fix/improve note about permissions 2023-06-23 11:25:45 +02:00
Fabian Aguilar Gomez
6e866d065b Merge pull request #64 from actions/file-perms-error-docs
Add file perms handling
2023-06-19 12:59:47 -05:00
Fabian Aguilar Gomez
a3f792f9c5 Update README.md 2023-06-19 12:48:14 -05:00
2 changed files with 42 additions and 0 deletions

View File

@@ -26,6 +26,42 @@ The [`tar` file][tar] must:
- be under 10GB in size
- not contain any symbolic or hard links
# File Permissions
When using this action, ensure that your files have appropriate file permissions.
At a minimum, GitHub Pages expects:
- files to have read permission for the current user and the "Others" user role (e.g. `0744`, `0644`, `0444`)
- directories to have read and execute permissions for the current user and the "Others" user role (e.g. `0755`, `0555`)
Failure to supply adequate permissions will result in a `deployment_perms_error` when attempting to deploy your artifacts to GitHub Pages.
```yaml
...
runs:
using: composite
steps:
- name: Archive artifact
shell: sh
if: runner.os == 'Linux'
run: |
chmod -c -R +rX "$INPUT_PATH" |
while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
tar \
--dereference --hard-dereference \
--directory "$INPUT_PATH" \
-cvf "$RUNNER_TEMP/artifact.tar" \
--exclude=.git \
--exclude=.github \
.
env:
INPUT_PATH: ${{ inputs.path }}
...
```
# Release instructions
In order to release a new version of this Action:

View File

@@ -21,6 +21,9 @@ runs:
shell: sh
if: runner.os == 'Linux'
run: |
chmod -c -R +rX "$INPUT_PATH" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
tar \
--dereference --hard-dereference \
--directory "$INPUT_PATH" \
@@ -36,6 +39,9 @@ runs:
shell: sh
if: runner.os == 'macOS'
run: |
chmod -v -R +rX "$INPUT_PATH" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
gtar \
--dereference --hard-dereference \
--directory "$INPUT_PATH" \