-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 962 Bytes
/
get_sum_ip.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
name: get_sum_ip
on:
schedule:
- cron: '*/30 * * * *' # every 30min
workflow_dispatch:
permissions:
contents: write # 允许写入权限
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3
with:
ref: 'master' # 确保检出到 master 分支
- name: 'Set up Python'
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: 'Install dependencies'
run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: 'Run get_sum_ip script'
run: python get_sum_ip.py
- name: 'Push sum_ip.txt to master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "cnthunder"
git config user.email "[email protected]"
git add sum_ip.txt
git commit -m "Add sum_ip.txt"
git push origin master