Skip to content

Commit c3cca5e

Browse files
authored
pull -> push added
1 parent a2332f4 commit c3cca5e

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

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

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

88
permissions:
99
contents: write
10-
10+
pull-requests: write
11+
1112
jobs:
1213
update-date:
1314
runs-on: ubuntu-latest
@@ -30,12 +31,17 @@ jobs:
3031
run: |
3132
git config --global user.email "github-actions[bot]@users.noreply.github.com"
3233
git config --global user.name "github-actions[bot]"
33-
34+
3435
- name: Update last modified date in Markdown files
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
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)