Skip to content

GitHub Actions Youthstudy Bot #488

GitHub Actions Youthstudy Bot

GitHub Actions Youthstudy Bot #488

Workflow file for this run

name: 'GitHub Actions Youthstudy Bot'
on:
workflow_dispatch:
inputs:
previous:
description: '是否打卡往期课程'
required: true
default: 'no'
type: choice
options:
- 'yes'
- 'no'
#以上勿动
schedule:
# UTC4:00(北京UTC+8 12:00点)触发任务
- cron: '0 4 * * *'
env:
push: true #不需要推送的请改为false
MEMBER: ${{ secrets.mid }}
PUSHTOKEN: ${{ secrets.PUSHTOKEN }}
jobs:
youthstudymark:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up env
run: pip install -r requirements.txt
- name: Run main command
run: python main.py
- name: Submit previous activity
if: github.event.inputs.previous == 'yes'
run: python previous.py
- name: Push result to Wechat by pushplus
if: env.push == 'true'
run: python push.py