π Generate Snake Contribution GIF #408
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generates snake animation via @Platane's actions | |
# Inspired by @Lissy93 | |
name: π Generate Snake Contribution GIF | |
on: | |
workflow_dispatch: # Manual dispatch | |
schedule: | |
- cron: '30 16 * * *' # Runs at 23:30 WIB every day. | |
jobs: | |
snake: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Generate Snake | |
uses: Platane/snk/svg-only@v2 | |
with: | |
github_user_name: ${{ github.repository_owner }} | |
outputs: | | |
assets/github-contribution-grid-snake.svg | |
assets/github-contribution-grid-snake-dark.svg?palette=github-dark | |
# Commit the changes | |
- name: Commit files | |
run: | | |
git config user.email "mitronametrix@protonmail.com" | |
git config user.name "ametrix-bot" | |
git add . | |
git commit -m ":snake: Updates Snake Animation" | |
# Push the changes | |
- name: Push | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.BOT_GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |