-
Notifications
You must be signed in to change notification settings - Fork 390
45 lines (37 loc) · 1 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
name: "Daily Fudan"
on:
schedule: # scheduled at (UTC+8) everyday
- cron: "32 21 * * *"
- cron: "14 7 * * *"
workflow_dispatch:
env:
RUN_ENV: 'prod'
TZ: 'Asia/Shanghai'
FUCK_GH_PAT: ${{ secrets.GH_PAT }}
jobs:
build:
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/master'
steps:
- name: Checkout master with GH_PAT
if: ${{ env.FUCK_GH_PAT }}
uses: actions/checkout@v3
with:
fetch-depth: 2
ref: main
token: ${{ secrets.GH_PAT }}
- name: Checkout master without GH_PAT
if: ${{ !env.FUCK_GH_PAT }}
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: edit_actions.py
if: ${{ env.FUCK_GH_PAT }}
run: python3 ./edit_actions.py '${{ secrets.SCHEDULE }}'
- name: run.py
run: python3 ./run.py '${{ secrets.FUDAN }}'