diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5ace460..7187169 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,6 @@ updates: directory: "/" schedule: interval: "weekly" + groups: + non-breaking-changes: + update-types: [minor, patch] diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 11f9ae6..7bb5966 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -8,7 +8,7 @@ jobs: draft-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: release-drafter/release-drafter@v5 + - uses: actions/checkout@v4 + - uses: release-drafter/release-drafter@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3898455..6a1857b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Update the ${{ env.TAG_NAME }} tag id: update-major-tag - uses: actions/publish-action@v0.2.2 + uses: actions/publish-action@v0.3.0 with: source-tag: ${{ env.TAG_NAME }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/test-hosted-runners.yml b/.github/workflows/test-hosted-runners.yml index 5b0dab9..0371537 100644 --- a/.github/workflows/test-hosted-runners.yml +++ b/.github/workflows/test-hosted-runners.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Generate files run: mkdir artifact && mkdir artifact2 && cd artifact && ../script/new-artifact.sh @@ -31,12 +31,13 @@ jobs: - name: Upload Pages artifact uses: ./ with: + name: pages-artifact-${{ matrix.os }} path: artifact - name: Download artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: github-pages + name: pages-artifact-${{ matrix.os }} path: artifact2 - name: Extract artifact diff --git a/README.md b/README.md index 4831eaa..835887a 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,6 @@ A composite Action for packaging and uploading artifact that can be deployed to [GitHub Pages][pages]. -## Scope - -⚠️ Official support for building Pages with Actions is in public beta at the moment. - ## Usage See [action.yml](action.yml) @@ -27,46 +23,7 @@ The [`tar` file][tar] must: - :warning: The GitHub Pages [officially supported maximum size limit is 1GB][pages-usage-limits], so the subsequent deployment of larger tarballs are not guaranteed to succeed — often because they are more prone to exceeding the maximum deployment timeout of 10 minutes. - ⛔ However, there is also an _unofficial_ absolute maximum size limit of 10GB, which Pages will not even _attempt_ to deploy. - not contain any symbolic or hard links -- contain only files and directories that all meet the expected minimum [file permissions](#file-permissions) - -### 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 -# ... -``` +- contain only files and directories ## Release instructions diff --git a/action.yml b/action.yml index d4c9a9f..a19976e 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,10 @@ inputs: description: "Duration after which artifact will expire in days." required: false default: "1" +outputs: + artifact_id: + description: "The ID of the artifact that was uploaded." + value: ${{ steps.upload-artifact.outputs.artifact-id }} runs: using: composite steps: @@ -21,6 +25,7 @@ runs: shell: sh if: runner.os == 'Linux' run: | + echo ::group::Archive artifact tar \ --dereference --hard-dereference \ --directory "$INPUT_PATH" \ @@ -28,6 +33,7 @@ runs: --exclude=.git \ --exclude=.github \ . + echo ::endgroup:: env: INPUT_PATH: ${{ inputs.path }} @@ -36,6 +42,7 @@ runs: shell: sh if: runner.os == 'macOS' run: | + echo ::group::Archive artifact gtar \ --dereference --hard-dereference \ --directory "$INPUT_PATH" \ @@ -43,6 +50,7 @@ runs: --exclude=.git \ --exclude=.github \ . + echo ::endgroup:: env: INPUT_PATH: ${{ inputs.path }} @@ -51,6 +59,7 @@ runs: shell: bash if: runner.os == 'Windows' run: | + echo ::group::Archive artifact tar \ --dereference --hard-dereference \ --directory "$INPUT_PATH" \ @@ -59,11 +68,13 @@ runs: --exclude=.github \ --force-local \ "." + echo ::endgroup:: env: INPUT_PATH: ${{ inputs.path }} - name: Upload artifact - uses: actions/upload-artifact@v3 + id: upload-artifact + uses: actions/upload-artifact@v4 with: name: ${{ inputs.name }} path: ${{ runner.temp }}/artifact.tar