Skip to main content
← Back to workflows

How to Generate Snake Game from GitHub Contributions Grid?

platane/snk -
GitHub Action
v3.2.0
4,264
Contributors
Contributor - PlataneContributor - threealContributor - Awayume
Categories
CICUBE ANALYTICS INSIGHTS
Engineering Velocity: 25% Team Time Lost to CI Issues
View Platform →
3.5h
Time Saved/Dev/Week
40%
Faster Releases
Click for next insight
Usage
- uses: Platane/snk@v3
with:
# github user name to read the contribution graph from (**required**)
# using action context var `github.repository_owner` or specified user
github_user_name: ${{ github.repository_owner }}

# 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.
outputs: |
dist/github-snake.svg
dist/github-snake-dark.svg?palette=github-dark
dist/ocean.gif?color_snake=orange&color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9

snk logo

snk

Generates a snake game from a GitHub user contributions graph and output a screen capture as animated SVG or GIF.


Platane/snk is GitHub Action that transforms a GitHub user's contribution graph into a snake game animation. The snake navigates through the graph, "eating" cells based on the contribution levels, which is visually represented in a GIF or SVG format.

It's set up as a GitHub action, meaning it can automatically update the image daily—perfect for spicing up your GitHub profile readme!

Here's how to use it:

  1. Add the GitHub Action to your workflow: Use uses: Platane/snk@v3.
  2. Configure the action:
    • GitHub User Name: Automatically uses the repository owner or you can specify a user.
    • Output Options: Choose from a variety of file types and visual settings. For instance, you can set different color palettes like 'github', 'github-dark', or 'github-light', and adjust the snake and dots colors to match your style. snk