Skip to content

Update Reference Data #33

Update Reference Data

Update Reference Data #33

name: Update Reference Data
on:
schedule:
# 每天 UTC 12:30 = 北京时间 20:30 (UTC+8)
- cron: "30 12 * * *"
workflow_dispatch:
# 支持手动触发
jobs:
update-reference:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: node_modules
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-${{ runner.os }}-
- name: Install dependencies
run: bun install
- name: Run pipeline (fetch + analyze + update)
run: bun pipeline
env:
BILIBILI_SESSDATA: ${{ secrets.BILIBILI_SESSDATA }}
BILIBILI_BILI_JCT: ${{ secrets.BILIBILI_BILI_JCT }}
BILIBILI_REFRESH_TOKEN: ${{ secrets.BILIBILI_REFRESH_TOKEN }}
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add references/ SKILL.md
if git diff --cached --quiet; then
echo "No changes to commit."
else
git commit -m "chore: auto-update reference data [skip ci]"
git push
echo "✅ Reference data updated and pushed."
fi