-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.34 KB
/
Copy pathsnake.yml
File metadata and controls
57 lines (46 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Generate Snake
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
jobs:
generate:
name: Generate snake SVG
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Generate snake animation
uses: Platane/snk@v3
with:
github_user_name: javascripto
outputs: |
dist/github-contribution-grid-snake.svg
- name: Upload snake artifact
uses: actions/upload-artifact@v4
with:
name: snake
path: dist
publish:
name: Publish to output branch
runs-on: ubuntu-latest
needs: generate
permissions:
contents: write
steps:
- name: Download snake artifact
uses: actions/download-artifact@v4
with:
name: snake
path: dist
- name: Push snake animation to output branch
run: |
git init
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b output
cp -r dist/* .
git add .
git commit -m "Generate snake animation" || echo "No changes to commit"
git remote add origin https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git
git push origin output --force