From 20d4098190d0fac83a2e5713efdbb49c17d91156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Nesveda?= Date: Thu, 14 May 2026 11:19:19 +0200 Subject: [PATCH 1/5] chore: Use custom action to commit changes in CI instead of `git commit` --- .github/workflows/docs.yaml | 20 +++++++++----- .github/workflows/release.yaml | 48 ++++++++++++++++++++++++---------- 2 files changed, 48 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 054af27839..e31794109d 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -40,14 +40,22 @@ jobs: SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_DOCS_PROJECT_KEY }} SEGMENT_TOKEN: ${{ secrets.SEGMENT_TOKEN }} + - name: Stage the updated package.json and lockfile + id: stage + run: | + git add website/package.json pnpm-lock.yaml + if git diff --cached --quiet; then + echo "has-changes=false" >> "$GITHUB_OUTPUT" + else + echo "has-changes=true" >> "$GITHUB_OUTPUT" + fi + - name: Commit the updated package.json and lockfile - uses: stefanzweifel/git-auto-commit-action@v7 + if: steps.stage.outputs.has-changes == 'true' + uses: apify/workflows/commit@v0.44.0 with: - commit_message: 'chore: Automatic theme updating workflow [skip ci]' - file_pattern: 'website/package.json pnpm-lock.yaml' - commit_user_name: Apify Bot - commit_user_email: my-github-actions-bot@example.org - commit_author: Apify Bot + commit-message: 'chore: Automatic theme updating workflow [skip ci]' + github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} - name: Set up GitHub Pages uses: actions/configure-pages@v6 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 15b6431a6b..82a4aa8b5d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -81,7 +81,7 @@ jobs: needs: [release_metadata, build_and_test] runs-on: ubuntu-22.04 outputs: - changelog_commitish: ${{ steps.commit.outputs.commit_long_sha || github.sha }} + changelog_commitish: ${{ steps.commit.outputs.commit-sha || github.sha }} version_number: ${{ needs.release_metadata.outputs.version_number }} tag_name: ${{ needs.release_metadata.outputs.tag_name }} release_notes: ${{ needs.release_metadata.outputs.release_notes }} @@ -112,14 +112,24 @@ jobs: write-mode: overwrite contents: ${{ needs.release_metadata.outputs.changelog }} + - name: Stage release changes + id: stage + run: | + git pull --rebase --autostash + git add -A + if git diff --cached --quiet; then + echo "has-changes=false" >> "$GITHUB_OUTPUT" + else + echo "has-changes=true" >> "$GITHUB_OUTPUT" + fi + - name: Add changes to the release commit and push id: commit - uses: EndBug/add-and-commit@v10 + if: steps.stage.outputs.has-changes == 'true' + uses: apify/workflows/commit@v0.44.0 with: - author_name: Apify Release Bot - author_email: noreply@apify.com - message: 'chore(release): set package version to ${{ needs.release_metadata.outputs.version_number }} and update changelog [skip ci]' - pull: '--rebase --autostash' + commit-message: 'chore(release): set package version to ${{ needs.release_metadata.outputs.version_number }} and update changelog [skip ci]' + github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} create_github_release: name: Create github release @@ -145,7 +155,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 with: - ref: ${{ needs.update_changelog.outputs.changelog_commitish }} + # Always check out the default branch (not the SHA) so the commit + # action can push to a branch ref. + ref: ${{ github.event.repository.default_branch }} token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} - name: Use Node.js 24 @@ -163,15 +175,23 @@ jobs: pnpm exec docusaurus docs:version "$MAJOR_MINOR" pnpm exec docusaurus api:version "$MAJOR_MINOR" + - name: Stage versioned docs + id: stage-version-docs + run: | + git pull --rebase --autostash + git add -A + if git diff --cached --quiet; then + echo "has-changes=false" >> "$GITHUB_OUTPUT" + else + echo "has-changes=true" >> "$GITHUB_OUTPUT" + fi + - name: Commit versioned docs - uses: EndBug/add-and-commit@v10 + if: steps.stage-version-docs.outputs.has-changes == 'true' + uses: apify/workflows/commit@v0.44.0 with: - author_name: Apify Release Bot - author_email: noreply@apify.com - message: 'docs: version docs for ${{ needs.update_changelog.outputs.version_number }} [skip ci]' - pull: '--rebase --autostash' - # `actions/checkout` detaches HEAD on SHA refs; EndBug needs a branch to push. - new_branch: ${{ github.event.repository.default_branch }} + commit-message: 'docs: version docs for ${{ needs.update_changelog.outputs.version_number }} [skip ci]' + github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} publish_to_npm: name: Publish to npm From 9a72ef699c8b0067d1f23d776a5fc20f9969c6d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Nesveda?= Date: Fri, 15 May 2026 16:47:15 +0200 Subject: [PATCH 2/5] Use `apify/actions/signed-commit`, simplify logic --- .github/workflows/docs.yaml | 16 +++------------ .github/workflows/release.yaml | 36 +++++++--------------------------- 2 files changed, 10 insertions(+), 42 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index e31794109d..4775512c3f 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -40,21 +40,11 @@ jobs: SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_DOCS_PROJECT_KEY }} SEGMENT_TOKEN: ${{ secrets.SEGMENT_TOKEN }} - - name: Stage the updated package.json and lockfile - id: stage - run: | - git add website/package.json pnpm-lock.yaml - if git diff --cached --quiet; then - echo "has-changes=false" >> "$GITHUB_OUTPUT" - else - echo "has-changes=true" >> "$GITHUB_OUTPUT" - fi - - name: Commit the updated package.json and lockfile - if: steps.stage.outputs.has-changes == 'true' - uses: apify/workflows/commit@v0.44.0 + uses: apify/actions/signed-commit@v1.0.0 with: - commit-message: 'chore: Automatic theme updating workflow [skip ci]' + message: 'chore: Automatic theme updating workflow [skip ci]' + add: 'website/package.json pnpm-lock.yaml' github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} - name: Set up GitHub Pages diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 82a4aa8b5d..cd927a6f8b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -81,7 +81,7 @@ jobs: needs: [release_metadata, build_and_test] runs-on: ubuntu-22.04 outputs: - changelog_commitish: ${{ steps.commit.outputs.commit-sha || github.sha }} + changelog_commitish: ${{ steps.commit.outputs.commit_sha || github.sha }} version_number: ${{ needs.release_metadata.outputs.version_number }} tag_name: ${{ needs.release_metadata.outputs.tag_name }} release_notes: ${{ needs.release_metadata.outputs.release_notes }} @@ -112,23 +112,12 @@ jobs: write-mode: overwrite contents: ${{ needs.release_metadata.outputs.changelog }} - - name: Stage release changes - id: stage - run: | - git pull --rebase --autostash - git add -A - if git diff --cached --quiet; then - echo "has-changes=false" >> "$GITHUB_OUTPUT" - else - echo "has-changes=true" >> "$GITHUB_OUTPUT" - fi - - name: Add changes to the release commit and push id: commit - if: steps.stage.outputs.has-changes == 'true' - uses: apify/workflows/commit@v0.44.0 + uses: apify/actions/signed-commit@v1.0.0 with: - commit-message: 'chore(release): set package version to ${{ needs.release_metadata.outputs.version_number }} and update changelog [skip ci]' + message: 'chore(release): set package version to ${{ needs.release_metadata.outputs.version_number }} and update changelog [skip ci]' + pull: '--rebase --autostash' github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} create_github_release: @@ -175,22 +164,11 @@ jobs: pnpm exec docusaurus docs:version "$MAJOR_MINOR" pnpm exec docusaurus api:version "$MAJOR_MINOR" - - name: Stage versioned docs - id: stage-version-docs - run: | - git pull --rebase --autostash - git add -A - if git diff --cached --quiet; then - echo "has-changes=false" >> "$GITHUB_OUTPUT" - else - echo "has-changes=true" >> "$GITHUB_OUTPUT" - fi - - name: Commit versioned docs - if: steps.stage-version-docs.outputs.has-changes == 'true' - uses: apify/workflows/commit@v0.44.0 + uses: apify/actions/signed-commit@v1.0.0 with: - commit-message: 'docs: version docs for ${{ needs.update_changelog.outputs.version_number }} [skip ci]' + message: 'docs: version docs for ${{ needs.update_changelog.outputs.version_number }} [skip ci]' + pull: '--rebase --autostash' github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} publish_to_npm: From 98c9fc8efe8c446358c5ffbb3fd6587376d83250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Nesveda?= Date: Fri, 15 May 2026 16:56:13 +0200 Subject: [PATCH 3/5] Remove unneeded fallback to `github.sha` --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cd927a6f8b..955ae09f03 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -81,7 +81,7 @@ jobs: needs: [release_metadata, build_and_test] runs-on: ubuntu-22.04 outputs: - changelog_commitish: ${{ steps.commit.outputs.commit_sha || github.sha }} + changelog_commitish: ${{ steps.commit.outputs.commit_sha }} version_number: ${{ needs.release_metadata.outputs.version_number }} tag_name: ${{ needs.release_metadata.outputs.tag_name }} release_notes: ${{ needs.release_metadata.outputs.release_notes }} From 7af2254437b424110775d085540b741c61b53524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Nesveda?= Date: Fri, 15 May 2026 18:36:34 +0200 Subject: [PATCH 4/5] Use long SHA when appropriate --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 955ae09f03..a85f7f5082 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -81,7 +81,7 @@ jobs: needs: [release_metadata, build_and_test] runs-on: ubuntu-22.04 outputs: - changelog_commitish: ${{ steps.commit.outputs.commit_sha }} + changelog_commitish: ${{ steps.commit.outputs.commit_long_sha }} version_number: ${{ needs.release_metadata.outputs.version_number }} tag_name: ${{ needs.release_metadata.outputs.tag_name }} release_notes: ${{ needs.release_metadata.outputs.release_notes }} From 92d4f4e1304956de7c8233339717474cb9be4b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Nesveda?= Date: Mon, 18 May 2026 16:40:52 +0200 Subject: [PATCH 5/5] chore: bump apify/actions/signed-commit to v1.1.2 --- .github/workflows/docs.yaml | 2 +- .github/workflows/release.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 4775512c3f..63cd731d83 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -41,7 +41,7 @@ jobs: SEGMENT_TOKEN: ${{ secrets.SEGMENT_TOKEN }} - name: Commit the updated package.json and lockfile - uses: apify/actions/signed-commit@v1.0.0 + uses: apify/actions/signed-commit@v1.1.2 with: message: 'chore: Automatic theme updating workflow [skip ci]' add: 'website/package.json pnpm-lock.yaml' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a85f7f5082..b30062f9eb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -114,7 +114,7 @@ jobs: - name: Add changes to the release commit and push id: commit - uses: apify/actions/signed-commit@v1.0.0 + uses: apify/actions/signed-commit@v1.1.2 with: message: 'chore(release): set package version to ${{ needs.release_metadata.outputs.version_number }} and update changelog [skip ci]' pull: '--rebase --autostash' @@ -165,7 +165,7 @@ jobs: pnpm exec docusaurus api:version "$MAJOR_MINOR" - name: Commit versioned docs - uses: apify/actions/signed-commit@v1.0.0 + uses: apify/actions/signed-commit@v1.1.2 with: message: 'docs: version docs for ${{ needs.update_changelog.outputs.version_number }} [skip ci]' pull: '--rebase --autostash'