WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit f3dd1e1

Browse files
authored
Update generate-snake.yml
1 parent f12e732 commit f3dd1e1

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

.github/workflows/generate-snake.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,53 @@
1+
GitHub Action for generating a contribution graph with a snake eating your contributions.
2+
13
name: Generate Snake
24

5+
# Controls when the action will run. This action runs every 6 hours.
6+
37
on:
48
schedule:
5-
- cron: "0 0 * * *" # Runs daily at midnight UTC
9+
# every 6 hours
10+
- cron: "0 */6 * * *"
11+
12+
# This command allows us to run the Action automatically from the Actions tab.
613
workflow_dispatch:
714

15+
# The sequence of runs in this workflow:
816
jobs:
17+
# This workflow contains a single job called "build"
918
build:
19+
# The type of runner that the job will run on
1020
runs-on: ubuntu-latest
1121

22+
# Steps represent a sequence of tasks that will be executed as part of the job
1223
steps:
13-
- name: Checkout repository
14-
uses: actions/checkout@v2
1524

16-
- name: Generate Snake Animation
17-
uses: Platane/snk@v3
25+
# Checks repo under $GITHUB_WORKSHOP, so your job can access it
26+
- uses: actions/checkout@v2
27+
28+
# Generates the snake
29+
- uses: Platane/snk@master
30+
id: snake-gif
31+
with:
32+
github_user_name: nurulshaikh786
33+
# these next 2 lines generate the files on a branch called "output". This keeps the main branch from cluttering up.
34+
gif_out_path: dist/github-contribution-grid-snake.gif
35+
svg_out_path: dist/github-contribution-grid-snake.svg
36+
37+
# show the status of the build. Makes it easier for debugging (if there's any issues).
38+
- run: git status
39+
40+
# Push the changes
41+
- name: Push changes
42+
uses: ad-m/github-push-action@master
1843
with:
19-
github_user_name: ${{ github.repository_owner }}
20-
outputs: |
21-
dist/github-contribution-grid-snake.svg
22-
dist/github-contribution-grid-snake-dark.svg?palette=github-dark
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
branch: master
46+
force: true
2347

24-
- name: Push Snake Animation to Output Branch
25-
uses: crazy-max/[email protected]
48+
- uses: crazy-max/[email protected]
2649
with:
50+
# the output branch we mentioned above
2751
target_branch: output
2852
build_dir: dist
2953
env:

0 commit comments

Comments
 (0)