Set bot user info to amend commits (#6011)
This commit is contained in:
14
.github/workflows/update-e2e-branch.yml
vendored
14
.github/workflows/update-e2e-branch.yml
vendored
@ -28,14 +28,18 @@ jobs:
|
|||||||
|
|
||||||
- name: Sync with main
|
- name: Sync with main
|
||||||
run: |
|
run: |
|
||||||
# checkout our branch
|
# Create the branch
|
||||||
git checkout all-e2e || git checkout -b all-e2e
|
git checkout all-e2e || git checkout -b all-e2e
|
||||||
# fetch origin
|
|
||||||
|
# Reset to main
|
||||||
git fetch origin
|
git fetch origin
|
||||||
# reset to main
|
|
||||||
git reset --hard origin/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)"
|
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 remote set-url origin https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository }}.git
|
||||||
git push --force origin all-e2e
|
git push --force origin all-e2e
|
||||||
|
Reference in New Issue
Block a user