DEV Community

Cover image for Watch a snake-eating🐍 my contribution graph on Github

Watch a snake-eating🐍 my contribution graph on Github

Mayank Choudhary
checking feed on my infinity novelty machine (phone)
Updated on ・2 min read

GitHub Actions to build and update a user's contribution graph, and then has a snake eat all your contributions. The output generates a gif file, that you can then show on your GitHub Profile README. I thought this was pretty cool, so I set about adding this to my profile.

Step 1. Setting up GitHub Actions

Head to your Profile and ensure the GitHub "Actions" is setup.
action button

Step 2. Create a yaml file on your GitHub Actions

Make sure you create a new *.yml file under the following directory:

YOUR_GITHUB_USERNAME --> .github --> workflows --> FILE_NAME.yml

(code and further details are here -)

Step 3. Running GitHub Actions

Once you've added the code above (don't forget to rename your-user name instead of mine) and committed it, head to your Actions tab. Under "Workflows", you should see the "Generate Snake" Action you created above.
Now, you should have received a green ✅ "build" checkmark. If so, this means your Action is working nicely. If not then follow this for more detailed explanation -

Step 4. Adding a contribution-eating snake to your profile

You will find your something like this

Watch a snake-eating🐍 my contribution graph on Github
snake gif

Once your action is live, then github will automatically commit the updated graph in every 6 hours.
Screenshot (250)

Discussion (0)