Skip to content

[schedule] Blocked

[schedule] Blocked #48

Workflow file for this run

name: "[schedule] Blocked"
on:
schedule:
- cron: "35 4 * * 1" # Monday 12:35 CST
workflow_dispatch:
inputs:
task:
type: choice
required: true
options:
- "mark-abuser-status"
- "remove-userrights"
env:
MOEGIRL_API_USER_AGENT: ${{ secrets.MOEGIRL_API_USER_AGENT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZH_ABOT: ${{ secrets.ZH_ABOT }}
jobs:
mark-abuser-status:
if: |
github.event_name == 'schedule' ||
github.event.inputs.task == 'mark-abuser-status'
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
run: node src/Blocked/markAbuserStatus.js
remove-userrights:
runs-on: ubuntu-latest
if: |
github.event_name == 'schedule' ||
github.event.inputs.task == 'remove-userrights'
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
run: node src/Blocked/removeUserrights.js