Compare commits

...
Author SHA1 Message Date
Jess Bees 2a5c144074 Use actions/download-artifact@v4 in test 2023-12-14 15:31:31 -05:00
Jess Bees 7e3f6bb53b Merge pull request #80 from robherley/patch-1
Use `v4` upload-artifact tag
2023-12-14 15:28:39 -05:00
Rob Herley 257e666c05 Use v4 upload-artifact tag
Artifacts v4 have been GA'd:
- https://github.blog/changelog/2023-12-14-github-actions-artifacts-v4-is-now-generally-available

We should use that tag going forward!
2023-12-14 14:04:50 -05:00
James M. Greene 0313a19afa Merge pull request #78 from konradpabjan/main
Upload pages artifact with upload-artifact v4-beta
2023-10-27 11:48:18 -05:00
Konrad PabjanandJames M. Greene 1228e65686 Update action.yml
Co-authored-by: James M. Greene <[email protected]>
2023-10-27 11:19:41 -04:00
Konrad Pabjan eb31309b6c Update artifact names in tests 2023-10-27 10:12:08 -04:00
Konrad Pabjan 241a975ec2 Correct artifact name during download 2023-10-26 14:59:03 -04:00
Konrad Pabjan ef95519d72 Unique artifact name per job 2023-10-26 14:57:05 -04:00
Konrad Pabjan ecdd3edff7 Switch to using download@v4-beta 2023-10-26 14:50:49 -04:00
Konrad Pabjan e699324f6a Upload pages artifact with upload-artifact@v4-beta 2023-10-26 13:48:59 -04:00
James M. Greene a753861a5d Merge pull request #69 from actions/reapply-chmod-removal-for-v2
Re-remove built-in `chmod` commands for `v2`
2023-07-10 13:12:45 -05:00
James M. Greene dca6bac0e5 Merge branch 'main' into reapply-chmod-removal-for-v2 2023-07-10 13:04:16 -05:00
James M. Greene 3138c05496 Merge pull request #70 from actions/v2-docs-improvements
Update README for `v2`
2023-07-10 13:04:05 -05:00
James M. Greene 07f501f6a0 Update README for v2
Better topic hierarchy and more copy-paste-friendly `chmod` examples
2023-07-10 11:59:59 -05:00
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 9c071e6bed Reapply PR #63 for v2 2023-07-10 11:05:03 -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
Fabian Aguilar Gomez 66b63f4a7d Merge pull request #63 from actions/chmod-delete
Chmod delete
2023-06-16 13:37:20 -05:00
Mingzi 82a6ae9add Merge branch 'main' into chmod-delete 2023-06-16 11:33:49 -07:00
Fabian Aguilar Gomez dd7005653b Update action.yml 2023-06-15 12:37:17 -05:00
Yoann Chaudet f6a706f190 Merge pull request #62 from jsoref/use-absolute-url
Use absolute URL
2023-06-15 10:31:33 -07:00
Fabian Aguilar Gomez 2642ae83d2 Update action.yml 2023-06-13 16:33:18 -05:00
Josh Soref 4d8166c5f5 Use absolute URL 2023-06-12 14:11:29 -04:00
James M. Greene 64bcae551a Merge pull request #55 from actions/err-if-no-files-found
Fail if no artifact file is found to upload
2023-03-24 10:12:27 -05:00
James M. Greene d07e4817c2 Lock in at a major version of actions/upload-artifact to prevent potential future breaks 2023-03-24 10:10:04 -05:00
James M. Greene 07744da919 Fail if no artifact file is found to upload
Fixes #24
2023-03-23 22:37:03 -05:00
James M. Greene a3acd10bdf Merge pull request #53 from waldyrious/patch-1
Fix link to releases in README
2023-02-10 21:34:47 -06:00
James M. Greene 1e171d0d53 Use absolute URL 2023-02-10 21:34:01 -06:00
Waldir Pimenta c06cea93b0 Fix link to releases in README 2023-02-05 09:27:34 +00:00
Yoann Chaudet d8fa6d6dc2 Merge pull request #47 from actions/dependabot/github_actions/actions/publish-action-0.2.2
Bump actions/publish-action from 0.2.1 to 0.2.2
2023-01-13 14:39:12 -08:00
dependabot[bot] 2b33ce347b Bump actions/publish-action from 0.2.1 to 0.2.2
Bumps [actions/publish-action](https://github.com/actions/publish-action) from 0.2.1 to 0.2.2.
- [Release notes](https://github.com/actions/publish-action/releases)
- [Commits](https://github.com/actions/publish-action/compare/v0.2.1...v0.2.2)

---
updated-dependencies:
- dependency-name: actions/publish-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-13 22:35:44 +00:00
James M. Greene 6fae3a4821 Merge pull request #46 from actions/dependabot-config
Add Dependabot config for Actions usage updates
2023-01-13 16:35:20 -06:00
James M. Greene c55689491b Add Dependabot config for Actions usage updates 2023-01-13 15:57:36 -06:00
Yoann Chaudet 253fd476ed Merge pull request #44 from KyeRussell/patch-1
Don't change file permissions of other files
2022-12-16 09:59:57 -08:00
Kye Russell 98c5608efa Don't change file permissions of other files
Fixes #43
2022-12-16 12:44:24 +08:00
Yoann Chaudet c8641e8004 Merge pull request #41 from yuradanyliuk/customize-artifact-name
Customize artifact name
2022-12-08 15:28:55 -08:00
Yoann Chaudet b27b6af8bf Merge branch 'main' into customize-artifact-name 2022-12-08 15:27:57 -08:00
Yoann Chaudet 73907447a0 Merge pull request #42 from actions/fix-permissions
Fix permissions
2022-12-08 15:21:43 -08:00
Yoann Chaudet 6da3417318 Wording 2022-12-08 14:48:49 -08:00
Yoann Chaudet 386aa88c28 Include folder 2022-12-08 14:44:29 -08:00
Yuriy Danyliuk 90d4377601 Add new input for artifact name 2022-12-05 03:31:49 +02:00
Jess Bees 79d3b41b30 Merge pull request #38 from actions/change-file-permissions
Print warnings about changed file permissions in bulk
2022-11-30 16:09:50 -05:00
Jess Bees 7d0004809d Print warnings about changed file permissions in bulk
This will avoid mangled output when files have spaces within them.
2022-11-29 16:56:15 -05:00
James M. Greene 1ca738b002 Merge pull request #36 from actions/JamesMGreene-patch-1
Update to latest `actions/publish-action`
2022-11-22 22:26:59 -06:00
James M. Greene 4103baae3e Update to latest actions/publish-action
To avoid Actions core deprecation messages.

https://github.com/actions/publish-action/releases/tag/v0.2.1
2022-11-22 10:27:53 -06:00
Jess Bees 4506126207 Merge pull request #34 from actions/change-file-permissions
Before tarring site, set file read permissions
2022-11-15 12:37:36 -05:00
Jess Bees 6de1c7ae49 Fix the mac shell script 2022-11-15 10:18:49 -05:00
Jess Bees de1b81a30a Use macos's non-gnu version of chmod 2022-11-14 11:41:47 -05:00
5 changed files with 69 additions and 20 deletions
+6
View File
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
+1 -1
View File
@@ -24,7 +24,7 @@ jobs:
steps: steps:
- name: Update the ${{ env.TAG_NAME }} tag - name: Update the ${{ env.TAG_NAME }} tag
id: update-major-tag id: update-major-tag
uses: actions/publish-action@v0.1.0 uses: actions/publish-action@v0.2.2
with: with:
source-tag: ${{ env.TAG_NAME }} source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
+3 -2
View File
@@ -31,12 +31,13 @@ jobs:
- name: Upload Pages artifact - name: Upload Pages artifact
uses: ./ uses: ./
with: with:
name: pages-artifact-${{ matrix.os }}
path: artifact path: artifact
- name: Download artifact - name: Download artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
with: with:
name: github-pages name: pages-artifact-${{ matrix.os }}
path: artifact2 path: artifact2
- name: Extract artifact - name: Extract artifact
+47 -7
View File
@@ -2,17 +2,17 @@
A composite Action for packaging and uploading artifact that can be deployed to [GitHub Pages][pages]. A composite Action for packaging and uploading artifact that can be deployed to [GitHub Pages][pages].
# Scope ## Scope
⚠️ Official support for building Pages with Actions is in public beta at the moment. ⚠️ Official support for building Pages with Actions is in public beta at the moment.
# Usage ## Usage
See [action.yml](action.yml) See [action.yml](action.yml)
<!-- TODO: document custom workflow --> <!-- TODO: document custom workflow -->
# Artifact validation ## Artifact validation
While using this action is optional, we highly recommend it since it takes care of producing (mostly) valid artifacts. While using this action is optional, we highly recommend it since it takes care of producing (mostly) valid artifacts.
@@ -25,8 +25,48 @@ The [`tar` file][tar] must:
- be under 10GB in size - be under 10GB in size
- not contain any symbolic or hard links - not contain any symbolic or hard links
- contain only files and directories that all meet the expected minimum [file permissions](#file-permissions)
# Release instructions ### 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.
#### Example permissions fix for Linux
```yaml
steps:
# ...
- name: Fix permissions
run: |
chmod -c -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
# ...
```
#### Example permissions fix for Mac
```yaml
steps:
# ...
- name: Fix permissions
run: |
chmod -v -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
# ...
```
## Release instructions
In order to release a new version of this Action: In order to release a new version of this Action:
@@ -38,15 +78,15 @@ In order to release a new version of this Action:
⚠️ Environment approval is required. Check the [Release workflow run list][release-workflow-runs]. ⚠️ Environment approval is required. Check the [Release workflow run list][release-workflow-runs].
# License ## License
The scripts and documentation in this project are released under the [MIT License](LICENSE). The scripts and documentation in this project are released under the [MIT License](LICENSE).
<!-- references --> <!-- references -->
[pages]: https://pages.github.com [pages]: https://pages.github.com
[release-list]: /releases [release-list]: https://github.com/actions/upload-pages-artifact/releases
[draft-release]: .github/workflows/draft-release.yml [draft-release]: .github/workflows/draft-release.yml
[release]: .github/workflows/release.yml [release]: .github/workflows/release.yml
[release-workflow-runs]: /actions/workflows/release.yml [release-workflow-runs]: https://github.com/actions/upload-pages-artifact/actions/workflows/release.yml
[gzip]: https://en.wikipedia.org/wiki/Gzip [gzip]: https://en.wikipedia.org/wiki/Gzip
[tar]: https://en.wikipedia.org/wiki/Tar_(computing) [tar]: https://en.wikipedia.org/wiki/Tar_(computing)
+12 -10
View File
@@ -2,6 +2,10 @@ name: "Upload GitHub Pages artifact"
description: "A composite action that prepares your static assets to be deployed to GitHub Pages" description: "A composite action that prepares your static assets to be deployed to GitHub Pages"
author: "GitHub" author: "GitHub"
inputs: inputs:
name:
description: 'Artifact name'
required: false
default: 'github-pages'
path: path:
description: "Path of the directory containing the static assets." description: "Path of the directory containing the static assets."
required: true required: true
@@ -10,6 +14,10 @@ inputs:
description: "Duration after which artifact will expire in days." description: "Duration after which artifact will expire in days."
required: false required: false
default: "1" default: "1"
outputs:
artifact_id:
description: "The ID of the artifact that was uploaded."
value: ${{ steps.upload-artifact.outputs.artifact-id }}
runs: runs:
using: composite using: composite
steps: steps:
@@ -17,10 +25,6 @@ runs:
shell: sh shell: sh
if: runner.os == 'Linux' if: runner.os == 'Linux'
run: | run: |
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 \ tar \
--dereference --hard-dereference \ --dereference --hard-dereference \
--directory "$INPUT_PATH" \ --directory "$INPUT_PATH" \
@@ -36,10 +40,6 @@ runs:
shell: sh shell: sh
if: runner.os == 'macOS' if: runner.os == 'macOS'
run: | run: |
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 \ gtar \
--dereference --hard-dereference \ --dereference --hard-dereference \
--directory "$INPUT_PATH" \ --directory "$INPUT_PATH" \
@@ -67,8 +67,10 @@ runs:
INPUT_PATH: ${{ inputs.path }} INPUT_PATH: ${{ inputs.path }}
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@main id: upload-artifact
uses: actions/upload-artifact@v4
with: with:
name: github-pages name: ${{ inputs.name }}
path: ${{ runner.temp }}/artifact.tar path: ${{ runner.temp }}/artifact.tar
retention-days: ${{ inputs.retention-days }} retention-days: ${{ inputs.retention-days }}
if-no-files-found: error