-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (38 loc) · 973 Bytes
/
update.yml
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
37
38
39
40
name: update
on:
schedule:
- cron: "0 3 * * *"
push:
tags:
- '*'
workflow_dispatch:
inputs:
name:
description: 'reason'
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
ref: "master"
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- run: |
sudo timedatectl set-timezone "Asia/Shanghai"
pip install -r requirements.txt
python ./main.py
- name: update readme
env:
GIT_USER: "Github Action"
GIT_EMAIL: "[email protected]"
run: |
git config user.name "${GIT_USER}"
git config user.email "${GIT_EMAIL}"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
git checkout master
git add .
git commit -m "Update by Github Action"
git push -u origin master