Skip to content

Snake Animation

Snake Animation #899

Workflow file for this run

name: Snake Animation
on:
schedule:
# Runs at 12am UTC
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
generate:
name: Github Contribution Snake Animation
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# generates a snake game from a github user (<github_user_name>) contributions graph, output a svg animation at <svg_out_path>
# list of files to generate.
# one file per line. Each output can be customized with options as query string.
#
# supported options:
# - palette: A preset of color, one of [github, github-dark, github-light]
# - color_snake: Color of the snake
# - color_dots: Coma separated list of dots color.
# The first one is 0 contribution, then it goes from the low contribution to the highest.
# Exactly 5 colors are expected.
- name: generate github-contribution-grid-snake.svg
uses: Platane/snk/svg-only@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/github-contribution-grid-snake.svg
dist/github-contribution-grid-snake-dark.svg?palette=github-dark&color_snake=orange
- uses: actions/upload-artifact@v2
with:
path: dist/*
upload:
needs: [generate]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
path: downloads
- name: Move artifacts to dist
run: |
rm -rf dist
mv downloads/artifact/ dist/
- name: Commit & push changes
uses: EndBug/add-and-commit@v9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
add: 'dist'
message: Update github contribution snake animation
signoff: true