forked from liuyuhe666/flzt-auto-checkin
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.05 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: Python
on:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
architecture: "x64"
cache: "pip"
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run main.py
env:
BASE_URL: ${{secrets.BASE_URL}}
EMAIL: ${{secrets.EMAIL}}
PASSWORD: ${{secrets.PASSWORD}}
run: |
python main.py
- name: Keep alive
run: |
echo "$(date +"%Y-%m-%d %H:%M:%S")" > updated
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "updated" || exit 0
git push