diff --git a/.github/workflows/update-e2e-branch.yml b/.github/workflows/update-e2e-branch.yml index 5ae23e9da..668d87dee 100644 --- a/.github/workflows/update-e2e-branch.yml +++ b/.github/workflows/update-e2e-branch.yml @@ -28,14 +28,18 @@ jobs: - name: Sync with main run: | - # checkout our branch + # Create the branch git checkout all-e2e || git checkout -b all-e2e - # fetch origin + + # Reset to main git fetch origin - # reset to main git reset --hard origin/main - # get a new SHA to prevent overwriting the commit status on main + + # Get a new SHA to prevent overwriting the commit status on main + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" git commit --amend --message="[all-e2e] $(git log --max-count=1 --pretty=%B)" - # force push it + + # Overwrite the branch git remote set-url origin https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository }}.git git push --force origin all-e2e