Skip to content

Weibo Consumer

Weibo Consumer #1606

Workflow file for this run

name: Weibo Consumer
on:
schedule:
- cron: '30 */6 * * *' # 每6小时运行一次
workflow_dispatch: # 支持手动触发
jobs:
media-consumer:
runs-on: ubuntu-latest
permissions:
contents: write # 添加写入权限以便提交
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: pnpm install
- name: Generate Prisma Client
run: pnpm exec prisma generate
- name: Install Playwright Browsers
run: pnpm exec playwright install chromium
- name: Run Consumer
run: pnpm run consume
- name: Configure Git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Commit and Push Changes
run: |
git add -A
git commit --allow-empty -m "chore: auto update data - consumer run at $(date -u '+%Y-%m-%d %H:%M UTC')"
git push