Skip to content

Get Home Latest Timeline #2451

Get Home Latest Timeline

Get Home Latest Timeline #2451

name: Get Home Latest Timeline
on:
schedule:
- cron: '*/30 * * * *' # 每30分钟运行
workflow_dispatch: # 允许手动触发
jobs:
update-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }} # 使用你设置的 secret
- name: Setup Git
run: |
git config --global user.name 'GitHub Actions Bot'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Run fetch script
env:
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
run: bun run scripts/fetch-tweets.ts
- name: Commit and push changes
run: |
git add .
git commit -m "chore: update user data [skip ci]" || exit 0
git push