Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
windmgc committed Feb 20, 2021
1 parent 004915d commit 08120d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/chnroute.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: chnroute

env:
GITHUB_TOKEN: ${{ secrets.ACC_TOKEN }}

on:
workflow_dispatch:
schedule:
Expand All @@ -12,4 +15,9 @@ jobs:
- uses: actions/checkout@v2
- run: |
make sync
make update_repo
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ GITHUB_TOKEN }}@github.com/${{ github.repository }}
git add .
git commit -m "Auto update $(date -u '+%Y-%m-%d %H:%M:%S')"
git push
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ generate_chnroutes:
src/chnroutes.py

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

1 comment on commit 08120d6

@windmgc
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.