-
Notifications
You must be signed in to change notification settings - Fork 91
40 lines (36 loc) · 1.04 KB
/
run.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: 刷步数
on:
#push:
# branches: [ main ]
#pull_request:
# branches: [ main ]
schedule:
- cron: '18 2,4,7,10,12,13 * * *'
watch:
types: started
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout codes
uses: actions/checkout@v4
- name: Update system and install zsh
run: |
sudo -E apt-get -qq update
sudo -E apt-get install zsh -y
- name: 初始化Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: 开始
run: |
pip3 install requests
user='${{ secrets.USER }}'
passwd='${{ secrets.PWD }}'
open_get_weather='${{ secrets.OPEN_GET_WEATHER }}'
area='${{ secrets.AREA }}'
sckey='${{ secrets.SCKEY }}'
python3 main.py ${user} ${passwd} ${open_get_weather} ${area} ${sckey}
time=$(TZ=UTC-8 date +'%Y-%m-%d %H:%M:%S')
echo "最后一次运行时间: $time(北京时间)"