A simple, easy-to-follow guide to add the animated snake game to your GitHub profile's contribution graph.
This repository provides the necessary GitHub Action workflow file and instructions to get you set up in less than 5 minutes.
Follow these three simple steps to get the snake on your profile.
-
Go to your special GitHub profile repository (the one with the same name as your username, e.g.,
YourUsername/YourUsername). -
Create a new file with the following path:
.github/workflows/snake.yml.- Tip: When you type
.github/in the filename box, GitHub will automatically create the folder.
- Tip: When you type
-
Copy the code from the
snake.ymlfile in this repository and paste it into the new file you just created.
-
Go to the Actions tab in your repository.
-
On the left sidebar, click on the "Generate Snake" workflow.
-
Click the Run workflow dropdown button, and then click the green Run workflow button inside it.
Wait about a minute for the action to complete. When you see a green checkmark, the animation files have been successfully generated in your repository.
You're all set! Now, just copy one of the following lines into your profile's README.md file to display the animation.
Light Mode Version(Recommended for light themes):
[](https://github.com/YOUR_USERNAME)
Light Mode Version(Recommended for light themes):
[](https://github.com/YOUR_USERNAME)
Important:
Remember to replace YOUR_USERNAME with your actual GitHub username!
-
Action Fails with
exit code 128: This means the action didn't have permission to write the newsnake.svgfile to your repository. The includedsnake.ymlfile already contains the fix (permissions: write-all), so you shouldn't encounter this if you copy the file correctly. -
Image Shows as a Broken Link: This usually means the URL in your README is incorrect. Double-check that you've replaced
YOUR_USERNAMEin the link and that the path is correct.
Enjoy your new contribution snake!
