Skip to content

Commit 6991b08

Browse files
committed
Add workflow to generate contribution snake
Introduces a GitHub Actions workflow that generates a contribution snake SVG daily and on push to main. Updates the README to reference the new SVG path in the output directory.
1 parent e6b6bf1 commit 6991b08

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

.github/workflows/snake.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Generate Snake
2+
3+
on:
4+
schedule:
5+
# Runs at 12:00 UTC daily
6+
- cron: "0 12 * * *"
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- main
11+
12+
jobs:
13+
generate:
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 10
16+
17+
steps:
18+
- name: Generate GitHub Contribution Snake
19+
uses: Platane/snk/svg-only@v3
20+
with:
21+
github_user_name: ThomasJButler
22+
outputs: |
23+
dist/github-contribution-grid-snake.svg
24+
dist/github-contribution-grid-snake-dark.svg?palette=github-dark
25+
26+
- name: Push to GitHub
27+
uses: EndBug/add-and-commit@v9
28+
with:
29+
branch: output
30+
add: 'dist/*'
31+
message: 'Generate contribution snake'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ The truth is, I love the technical challenges too and solving problems with code
126126
---
127127

128128
<p align="center">
129-
<img width="1000" src="https://raw.githubusercontent.com/ThomasJButler/ThomasJButler/output/github-contribution-grid-snake.svg" alt="snake"/>
129+
<img width="1000" src="https://raw.githubusercontent.com/ThomasJButler/ThomasJButler/output/dist/github-contribution-grid-snake.svg" alt="snake"/>
130130
</p>
131131

132132

0 commit comments

Comments
 (0)