mirror of
https://github.com/Alvin-Zilverstand/Alvin-Zilverstand.git
synced 2026-03-06 13:20:58 +01:00
34 lines
939 B
YAML
34 lines
939 B
YAML
name: Generate Contribution Snake
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 */12 * * *" # Runs daily at midnight
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # 👈 ensures this job can push
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Generate Snake
|
|
uses: Platane/snk/svg-only@v3
|
|
with:
|
|
github_user_name: Alvin-Zilverstand
|
|
outputs: dist/snake.svg
|
|
|
|
- name: Commit and push snake.svg to output branch
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git checkout --orphan output
|
|
git reset
|
|
mkdir -p dist
|
|
cp dist/snake.svg snake.svg
|
|
git add snake.svg
|
|
git commit -m "chore: update snake animation"
|
|
git push -f origin output
|