-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.09 KB
/
main.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
47
48
49
#自动调用api保活
name: Auto Api
on:
release:
types: [published]
push:
branches:
- master
tags:
- 'v*'
schedule:
- cron: 0 */2 * * *
watch:
types: [started]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install requests
run: |
pip install requests
pip install pynacl
- name: read config from secrets
env:
id: ${{ secrets.CONFIG_ID }}
secret: ${{ secrets.CONFIG_KEY }}
token: ${{secrets.GPT_TOKEN}}
refresh_token: ${{secrets.REFRESH_TOKEN}}
run: |
python main.py
- name: commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "ShermanQ"
git add .
git commit -m "update new token" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}