Generate Snake #327
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 创建 Snake, see: https://github.com/Platane/snk | |
# 工作流名称 | |
name: Generate Snake | |
# 工作流触发时机, see: https://docs.github.com/zh/actions/using-workflows/triggering-a-workflow | |
# 触发条件修改为: 当 main 分支有 push 操作 || 每天 0 点 | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 0 * * *" | |
# 作业, see: https://docs.github.com/zh/actions/using-jobs/using-jobs-in-a-workflow | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# 使用 actions/checkout, see: https://github.com/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# 生成统计图, see: https://github.com/lowlighter/metrics | |
- name: metrics-Half-year-calendar | |
uses: lowlighter/metrics@latest | |
with: | |
base: "" | |
filename: assets/metrics.plugin.isocalendar.svg | |
token: ${{ github.token }} | |
plugin_isocalendar: yes | |
# 使用 Platane/snk 生成图片(贪吃蛇), see: https://github.com/Platane/snk | |
- name: Generate Snake | |
uses: Platane/snk@v3 | |
with: | |
github_user_name: ${{ github.repository_owner }} | |
outputs: | | |
assets/github-snake.svg | |
assets/github-snake-dark.svg?palette=github-dark | |
assets/ocean.gif?color_snake=orange&color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9 | |
# 使用 EndBug/add-and-commit 提交代码, see: https://github.com/EndBug/add-and-commit | |
- name: Push to GitHub | |
uses: EndBug/add-and-commit@v9 | |
with: | |
branch: main | |
default_author: github_actions | |
message: 'Generate Contribution Snake' |