Skip to content

Cron Update Spam List #904

Cron Update Spam List

Cron Update Spam List #904

name: Cron Update Spam List
on:
schedule:
- cron: "0 * * * *" # Every hour at minute 0
workflow_dispatch:
inputs:
dry_run:
description: 'If true, do not post comments (dry run). Accepts "true" or "false". Default true for manual runs.'
required: false
default: "true"
permissions:
contents: read
pull-requests: read
issues: write
env:
DRY_RUN: ${{ github.event.inputs.dry_run || 'false' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
update-spam-list:
runs-on: hl-sdk-py-lin-md
steps:
- name: Harden runner (audit outbound calls)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Update spam list
id: update-spam-list
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const updateSpamList = require('./.github/scripts/cron-admin-update-spam-list.js');
await updateSpamList({ github, context, core });