Skip to content

Generate contribution animation #353

Generate contribution animation

Generate contribution animation #353

name: Generate contribution animation
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "0 */24 * * *"
jobs:
generate-svgs:
runs-on: ubuntu-latest
name: Generate SVG
timeout-minutes: 5
steps:
# generates a snake game from a github user (<github_user_name>) contributions graph, output a svg animation at <svg_out_path>
- name: Generate contribution SVGs
uses: Platane/snk/svg-only@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
assets/github-contribution-grid-snake.svg
assets/github-contribution-grid-snake-dark.svg?palette=github-dark
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: assets
path: |
assets/github-contribution-grid-snake.svg
assets/github-contribution-grid-snake-dark.svg
push-assets:
runs-on: ubuntu-latest
name: Push assets
needs: [generate-svgs]
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: assets
path: assets
- uses: stefanzweifel/git-auto-commit-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: "chore(assets): update snk svgs"
branch: main
commit_user_name: Ju1-js
commit_user_email: [email protected]
commit_author: Ju1-js <[email protected]>