Skip to content

[schedule] Suppress #595

[schedule] Suppress

[schedule] Suppress #595

Workflow file for this run

name: "[schedule] Suppress"
on:
schedule:
- cron: "35 8 * * 1,5" # Monday, Friday 16:35 CST
- cron: "35 8 * * 2,6" # Tuesday, Saturday 16:35 CST
- cron: "35 8 * * 3,0" # Wednesday, Sunday 16:35 CST
workflow_dispatch:
inputs:
task:
description: 'Select the task to run'
type: choice
required: true
options:
- page-log
- user-log
- revoke-user
env:
MOEGIRL_API_USER_AGENT: ${{ secrets.MOEGIRL_API_USER_AGENT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MOEGIRL_PASSWORD: ${{ secrets.MOEGIRL_PASSWORD }}
jobs:
page-log:
if: |
github.event.schedule == '35 8 * * 1,5' ||
github.event.inputs.task == 'page-log'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set Node Version
uses: actions/setup-node@v6
with:
node-version: 20.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Script
run: node src/Suppress/pageLog.js
user-log:
if: |
github.event.schedule == '35 8 * * 3,0' ||
github.event.inputs.task == 'user-log'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set Node Version
uses: actions/setup-node@v6
with:
node-version: 20.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Script
run: node src/Suppress/userLog.js
revoke-user:
if: |
github.event.schedule == '35 8 * * 2,6' ||
github.event.inputs.task == 'revoke-user'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set Node Version
uses: actions/setup-node@v6
with:
node-version: 20.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Script
run: node src/Suppress/revokeUser.js