Skip to content

[schedule] Activity

[schedule] Activity #4

Workflow file for this run

name: "[schedule] Activity"
# src/Activity/maintainer.js - 1x morning.yaml
on:
schedule:
- cron: "55 21 * * 3" # Thursday 05:55 CST
- cron: "35 11 10,25 * *" # 10th, 25th 19:35 CST
workflow_dispatch:
inputs:
task:
type: choice
required: true
options:
- "group-leader"
- "group-member"
env:
MOEGIRL_API_USER_AGENT: ${{ secrets.MOEGIRL_API_USER_AGENT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
group-leader:
if: |
github.event.schedule == '55 21 * * 3' ||
github.event.inputs.task == 'group-leader'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Node Version
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run Script
env:
ZH_IBOT: ${{ secrets.ZH_IBOT }}
CM_IBOT: ${{ secrets.CM_IBOT }}
run: node src/Activity/groupLeader.js
group-member:
runs-on: ubuntu-latest
if: |
github.event.schedule == '35 11 10,25 * *' ||
github.event.inputs.task == 'group-member'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Node Version
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run Script
env:
ZH_ABOT: ${{ secrets.ZH_ABOT }}
run: node src/Activity/groupMember.js