generate animation #1013
This file contains hidden or 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
name: generate animation | |
on: | |
schedule: | |
- cron: "0 12 * * *" # every 6 hours | |
workflow_dispatch: | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
# generates a snake game from a github user (<github_user_name>) contributions graph, output a svg animation at <svg_out_path> | |
- name: generate github-contribution-grid-snake.svg | |
uses: Platane/snk@v3 | |
with: | |
github_user_name: ${{ github.repository_owner }} | |
outputs: | | |
out/github-snake.svg | |
out/github-snake-dark.svg?palette=github-dark | |
out/ocean.gif?color_snake=orange&color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Commit files | |
run: | | |
git add out/ | |
git config --local user.email "bot@nn.ci" | |
git config --local user.name "Bot" | |
git commit --allow-empty -m "update github-contribution-grid-snake.svg" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |