diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e929360..ec2b32c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,8 +4,14 @@ updates: directory: "/" schedule: interval: "weekly" + groups: + non-breaking-changes: + update-types: [minor, patch] - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" + groups: + non-breaking-changes: + update-types: [minor, patch] diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 15d772a..8250758 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -24,12 +24,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Login against a Docker registry except on PR # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -46,14 +46,14 @@ jobs: echo "tags=$tags" >> $GITHUB_OUTPUT - name: Extract Docker metadata id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: Dockerfile diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index d6d081b..da3e3ee 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -11,7 +11,7 @@ jobs: draft-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: release-drafter/release-drafter@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/record.yml b/.github/workflows/record.yml index 2211356..86ff1f1 100644 --- a/.github/workflows/record.yml +++ b/.github/workflows/record.yml @@ -16,7 +16,7 @@ jobs: tag: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.regex-match.outputs.group1 }} steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Grep action.yaml content id: grep-image-content run: | @@ -44,9 +44,9 @@ jobs: - future-true steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build local docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 665864d..03c06d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Grep action.yaml content id: grep-image-content run: | @@ -53,6 +53,6 @@ jobs: steps: - name: Update the ${{ env.TAG_NAME }} major 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 }} diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index f92279d..0789451 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -14,7 +14,7 @@ jobs: SHELLCHECK_OPTS: -s bash steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run ShellCheck uses: ludeeus/action-shellcheck@master diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29a0508..4cf2e0e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: tag: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.regex-match.outputs.group1 }} steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Grep action.yaml content id: grep-image-content run: | @@ -46,9 +46,9 @@ jobs: - future-true steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build local docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: Dockerfile diff --git a/action.yml b/action.yml index d95d4cc..2cf6a9b 100644 --- a/action.yml +++ b/action.yml @@ -28,4 +28,4 @@ inputs: default: ${{ github.token }} runs: using: 'docker' - image: 'docker://ghcr.io/actions/jekyll-build-pages:v1.0.8' + image: 'docker://ghcr.io/actions/jekyll-build-pages:v1.0.9' diff --git a/entrypoint.sh b/entrypoint.sh index 024fe95..0eb3fac 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,8 +6,6 @@ # #################################################################################################### -set -o errexit - SOURCE_DIRECTORY=${GITHUB_WORKSPACE}/$INPUT_SOURCE DESTINATION_DIRECTORY=${GITHUB_WORKSPACE}/$INPUT_DESTINATION PAGES_GEM_HOME=$BUNDLE_APP_CONFIG @@ -15,7 +13,7 @@ GITHUB_PAGES_BIN=$PAGES_GEM_HOME/bin/github-pages # Check if Gemfile's dependencies are satisfied or print a warning if test -e "$SOURCE_DIRECTORY/Gemfile" && ! bundle check --dry-run --gemfile "$SOURCE_DIRECTORY/Gemfile"; then - echo "::warning:: github-pages can't satisfy your Gemfile's dependencies." + echo "::warning::The github-pages gem can't satisfy your Gemfile's dependencies. If you want to use a different Jekyll version or need additional dependencies, consider building Jekyll site with GitHub Actions: https://jekyllrb.com/docs/continuous-integration/github-actions/" fi # Set environment variables required by supported plugins @@ -39,5 +37,22 @@ else FUTURE='' fi -cd "$PAGES_GEM_HOME" -$GITHUB_PAGES_BIN build "$VERBOSE" "$FUTURE" --source "$SOURCE_DIRECTORY" --destination "$DESTINATION_DIRECTORY" +{ cd "$PAGES_GEM_HOME" || { echo "::error::pages gem not found"; exit 1; }; } + +# Run the command, capturing the output +build_output="$($GITHUB_PAGES_BIN build "$VERBOSE" "$FUTURE" --source "$SOURCE_DIRECTORY" --destination "$DESTINATION_DIRECTORY")" + +# Capture the exit code +exit_code=$? + +if [ $exit_code -ne 0 ]; then + # Remove the newlines from the build_output as annotation not support multiline + error=$(echo "$build_output" | tr '\n' ' ' | tr -s ' ') + echo "::error::$error" +else + # Display the build_output directly + echo "$build_output" +fi + +# Exit with the captured exit code +exit $exit_code diff --git a/test_projects/mojombo/Gemfile.lock b/test_projects/mojombo/Gemfile.lock index 60f8627..8b1d6d2 100644 --- a/test_projects/mojombo/Gemfile.lock +++ b/test_projects/mojombo/Gemfile.lock @@ -103,12 +103,12 @@ GEM rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9.7) mercenary (0.3.6) - mini_portile2 (2.8.2) + mini_portile2 (2.8.5) minima (2.0.0) minitest (5.9.1) multipart-post (2.0.0) net-dns (0.8.0) - nokogiri (1.15.2) + nokogiri (1.16.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) octokit (4.6.0) @@ -116,7 +116,7 @@ GEM pathutil (0.14.0) forwardable-extended (~> 2.6) public_suffix (1.5.3) - racc (1.7.1) + racc (1.7.3) rb-fsevent (0.9.8) rb-inotify (0.9.7) ffi (>= 0.5.0)