mirror of
https://github.com/hex-ci/smzdm_script.git
synced 2026-02-03 02:24:41 +08:00
Add github action
This commit is contained in:
33
.github/workflows/run.yml
vendored
Normal file
33
.github/workflows/run.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: "GitHub Actions SMZDM Bot"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 12 * * *"
|
||||
|
||||
env:
|
||||
TZ: Asia/Shanghai
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9
|
||||
|
||||
- name: Install requirements
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Working
|
||||
env:
|
||||
SMZDM_COOKIE: ${{ secrets.SMZDM_COOKIE }}
|
||||
PUSH_PLUS_TOKEN: ${{ secrets.PUSH_PLUS_TOKEN }}
|
||||
run: python main.py
|
||||
Reference in New Issue
Block a user