From 67101634f9e677137f197fca7c328aaadbfba975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Nesveda?= Date: Thu, 14 May 2026 11:19:48 +0200 Subject: [PATCH] chore: Use custom action to commit changes in CI instead of `git commit` --- .../workflows/_update_release_metadata.yaml | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/_update_release_metadata.yaml b/.github/workflows/_update_release_metadata.yaml index 283bcb5..efcae90 100644 --- a/.github/workflows/_update_release_metadata.yaml +++ b/.github/workflows/_update_release_metadata.yaml @@ -55,7 +55,7 @@ jobs: name: Update changelog runs-on: ubuntu-latest outputs: - changelog_commitish: ${{ steps.commit.outputs.commit_long_sha || github.sha }} + changelog_commitish: ${{ steps.commit.outputs.commit-sha || github.sha }} steps: - name: Checkout repository uses: actions/checkout@v6 @@ -77,10 +77,20 @@ jobs: write-mode: overwrite contents: ${{ needs.release_metadata.outputs.changelog }} + - name: Stage changes + id: stage + run: | + 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 changes 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): Update changelog and package version [skip ci]' + commit-message: 'chore(release): Update changelog and package version [skip ci]' + github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}