generate animation #572
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
name: generate animation | |
on: | |
schedule: | |
- cron: "0 12 * * *" # every 12 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@master | |
with: | |
github_user_name: ${{ github.repository_owner }} | |
svg_out_path: out/github-contribution-grid-snake.svg | |
- name: Commit files | |
run: | | |
git add out/ | |
git config --local user.email "bot@github.com" | |
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 }} |