- README 增加「项目展示」「文章推荐」区块(暂用占位内容,附替换提示) - 统计区新增 github-readme-activity-graph 活跃度曲线图 - 统计区新增贡献蛇动画(picture 标签自动适配深浅色主题) - 新增 snake.yml 工作流,每 12 小时生成 profile/snake.svg 与 snake-dark.svg - 同步更新 CLAUDE.md 说明 Co-Authored-By: daitcl <daitcl@users.noreply.github.com>
36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
name: Generate Snake
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 */12 * * *" # 每 12 小时更新一次
|
|
workflow_dispatch: # 支持手动触发
|
|
|
|
# 说明:不使用 push 触发,避免本工作流提交后自我循环触发
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
generate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# 生成贡献蛇(浅色 + 深色两版,自动适配主题)
|
|
- name: Generate snake SVG
|
|
uses: Platane/snk/svg-only@v3
|
|
with:
|
|
github_user_name: ${{ github.repository_owner }}
|
|
outputs: |
|
|
profile/snake.svg
|
|
profile/snake-dark.svg?palette=github-dark
|
|
|
|
# 提交生成的蛇到仓库(与 stats.yml 保持同样的提交模式)
|
|
- name: Commit snake
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add profile/snake.svg profile/snake-dark.svg
|
|
git commit -m "Update snake" || exit 0
|
|
git push
|