forked from bighammer-link/jichang_dailycheckin
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.03 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
name: "Airport Checkin"
on:
schedule:
# 分(0-59) 小时(0-23) 日期(1-31) 月份(1-12) 星期(0-7) 年(可选字段)
- cron: "06 22 * * *" #scheduled at 00:10 (UTC+8) everyday UTC+8比UTC快8个小时
workflow_dispatch:
env:
RUN_ENV: 'prod'
jobs:
build:
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/master'
steps:
- name: Checkout master
uses: actions/checkout@v2
with:
fetch-depth: 0
# ref: master
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9.12
- name: Random sleep
if: github.event_name == 'schedule'
run: sleep $(shuf -i 10-100 -n 1)
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run sign
env:
SCKEY: ${{ secrets.SCKEY }}
EMAIL: ${{ secrets.EMAIL }}
PASSWD: ${{ secrets.PASSWD }}
run: |
python3 ./main.py