-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 840 Bytes
/
update.yml
File metadata and controls
36 lines (31 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: update
on:
schedule:
- cron: "0 0 * * *"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go
- name: Checkout Code
uses: actions/checkout@v2
- name: Update Ranking List
run: go run main.go
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push Results
env:
GITHUB_USER: "bot"
GITHUB_EMAIL: "actions@github.com"
run: |
git config user.name "${GITHUB_USER}"
git config user.email "${GITHUB_EMAIL}"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
git checkout master
git commit -am "Auto Update"
git push -u origin master