mirror of
https://github.com/Alvin-Zilverstand/Alvin-Zilverstand.git
synced 2026-03-07 05:43:58 +01:00
Refactor GitHub Actions workflow for generating contribution snake by removing push trigger and improving step organization
This commit is contained in:
17
.github/workflows/snake.yml
vendored
17
.github/workflows/snake.yml
vendored
@@ -4,21 +4,26 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *" # Runs every day at midnight
|
- cron: "0 0 * * *" # Runs every day at midnight
|
||||||
workflow_dispatch: # Allow manual runs
|
workflow_dispatch: # Allow manual runs
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: Platane/snk@v3
|
# 1. Checkout repo
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# 2. Generate snake SVG
|
||||||
|
- name: Generate Snake
|
||||||
|
uses: Platane/snk/svg-only@v3
|
||||||
with:
|
with:
|
||||||
github_user_name: Alvin-Zilverstand
|
github_user_name: Alvin-Zilverstand
|
||||||
outputs: dist/snake.svg
|
outputs: dist/snake.svg
|
||||||
|
|
||||||
|
# 3. Push generated snake to output branch
|
||||||
- name: Push Snake to output branch
|
- name: Push Snake to output branch
|
||||||
uses: EndBug/add-and-commit@v9
|
uses: EndBug/add-and-commit@v9
|
||||||
with:
|
with:
|
||||||
branch: output
|
|
||||||
message: "chore: update snake animation"
|
|
||||||
add: "dist/snake.svg"
|
add: "dist/snake.svg"
|
||||||
|
new_branch: output
|
||||||
|
message: "chore: update snake animation"
|
||||||
|
|||||||
Reference in New Issue
Block a user