Skip to content

Commit 1f3a0ae

Browse files
authored
pull -> push
1 parent 9a0ccb5 commit 1f3a0ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/update-md-date.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
pull-requests: write
1011

1112
jobs:
1213
update-date:
@@ -35,7 +36,12 @@ jobs:
3536
run: python .github/workflows/update_date.py
3637

3738
- name: Commit changes
39+
env:
40+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
3841
run: |
42+
git fetch origin ${{ github.event.pull_request.head.ref }}
43+
git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed"
3944
git add -A
4045
git commit -m "Update last modified date in Markdown files" || echo "No changes to commit"
46+
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
4147
git push origin HEAD:${{ github.event.pull_request.head.ref }}

0 commit comments

Comments
 (0)