Skip to content

Commit 08120d6

Browse files
committed
Update workflow
1 parent 004915d commit 08120d6

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Diff for: .github/workflows/chnroute.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: chnroute
22

3+
env:
4+
GITHUB_TOKEN: ${{ secrets.ACC_TOKEN }}
5+
36
on:
47
workflow_dispatch:
58
schedule:
@@ -12,4 +15,9 @@ jobs:
1215
- uses: actions/checkout@v2
1316
- run: |
1417
make sync
15-
make update_repo
18+
git config --global user.name "github-actions[bot]"
19+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
20+
git remote set-url origin https://x-access-token:${{ GITHUB_TOKEN }}@github.com/${{ github.repository }}
21+
git add .
22+
git commit -m "Auto update $(date -u '+%Y-%m-%d %H:%M:%S')"
23+
git push

Diff for: Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ generate_chnroutes:
99
src/chnroutes.py
1010

1111
update_repo:
12+
git pull origin master
1213
git add .
1314
git diff-index --quiet HEAD || git commit -m "Auto updated $(TIME_NOW)"
1415
git push origin master

0 commit comments

Comments
 (0)