From ec227ca070dbb9aad94cc7b0e39f2a19aede0c49 Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Mon, 29 Apr 2024 14:01:11 +0300 Subject: [PATCH] fix(ci): commit on PR --- .github/workflows/ci.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9b63f2dd..c5bab765 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -52,10 +52,15 @@ jobs: # - name: Setup tmate session # uses: mxschmitt/action-tmate@v3 - - name: Configure github-actions bot + - name: Configure git + env: + # required for gh + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - git config --global user.name github-actions - git config --global user.email github-actions@github.com + ${{ github.head_ref && format('gh pr checkout {0}', github.event.pull_request.number) || ''}} + + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" - name: Rebase run: ${{ env.git_pull }} @@ -69,9 +74,9 @@ jobs: - name: Commit & push changes run: | git add dist - git commit -m "chore: build the action" || echo "" + git commit -m "chore: build the action" || echo "Nothing to commit" git add . - git commit -m "chore: update docs" || echo "" + git commit -m "chore: update docs" || echo "Nothing to commit" git push # Make `individual` caches