Skip to content

Commit

Permalink
Update MAIN.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tranlynhathao committed Jan 16, 2024
1 parent 11d03eb commit 5a32e70
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/MAIN.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,43 @@
# 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@v2

# Generates the snake
- uses: Platane/snk@master
id: snake-gif
with:
github_user_name: tranlynhathao
# these next 2 lines generate the files on a branch called "output". This keeps the main branch from cluttering up.
gif_out_path: dist/github-contribution-grid-snake.gif
svg_out_path: dist/github-contribution-grid-snake.svg

# show the status of the build. Makes it easier for debugging (if there's any issues).
- run: git status

# Push the changes
- name: Push changes
uses: ad-m/github-push-action@master
with:
Expand All @@ -30,6 +47,7 @@ jobs:

- uses: crazy-max/[email protected]
with:
# the output branch we mentioned above
target_branch: output
build_dir: dist
env:
Expand Down

0 comments on commit 5a32e70

Please sign in to comment.