Skip to content

Commit 7b8e8a0

Browse files
authored
Merge pull request #30 from githubnext/copilot/configure-git-credentials-before-merge
sync-branches: configure git credentials before merge/push step
2 parents 398f068 + 3857a44 commit 7b8e8a0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

workflows/sync-branches.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ steps:
2323
- name: Merge default branch into all autoloop program branches
2424
env:
2525
GITHUB_REPOSITORY: ${{ github.repository }}
26+
GITHUB_TOKEN: ${{ github.token }}
2627
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
2728
run: |
29+
git config user.name "github-actions[bot]"
30+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
31+
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
2832
node - << 'JSEOF'
2933
const { execSync, spawnSync } = require('child_process');
3034

0 commit comments

Comments
 (0)