Skip to content

Generate Snake

Generate Snake #3412

Workflow file for this run

# GitHub Action for generating a contribution graph with a snake eating your contributions.
name: Generate Snake
# Controls when the action will run. This action runs every 6 hours.
on:
schedule:
# every 6 hours
- cron: "0 */6 * * *"
# This command allows us to run the Action automatically from the Actions tab.
workflow_dispatch:
# The sequence of runs in this workflow:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks repo under $GITHUB_WORKSHOP, so your job can access it
- uses: actions/checkout@v3
# Generates the snake
- uses: Platane/snk@v3
id: snake-gif
with:
github_user_name: CodeKaito
# these next 2 lines generate the files on a branch called "output". This keeps the main branch from cluttering up.
outputs: |
dist/github-contribution-grid-snake.gif
dist/github-contribution-grid-snake.svg
dist/github-contribution-grid-snake-dark.svg?palette=github-dark
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# show the status of the build. Makes it easier for debugging (if there's any issues).
- name: Show build status
run: git status
- name: Push new files to output branch
uses: crazy-max/ghaction-github-pages@v3.1.0
with:
# the output branch we mentioned above
target_branch: output
build_dir: dist
commit_message: Update snake animations
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}