-
Notifications
You must be signed in to change notification settings - Fork 90
46 lines (42 loc) · 1.12 KB
/
AutoApi.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
41
42
43
44
45
46
#自动调用api保活,无加密版
name: Auto Api
on:
release:
types: [published]
push:
tags:
- 'v*'
# branches:
# - master
schedule:
- cron: '0 */6 * * *'
watch:
types: [started]
jobs:
build:
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id # 自己点的 start
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up Python #安装python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install requests #安装requests
run: |
pip install requests
- name: Test Api #Api调用
run: |
echo `date +"%Y-%m-%d %H:%M:%S"` begin > time.log
python 1.py
- name: commit #上传新的refresh_token
run: |
git config --global user.email [email protected]
git config --global user.name AutoupdateRobot
git add .
git commit -m "update new refresh_token" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}