Skip to content

update sneek

update sneek #5

Workflow file for this run

name: generate snake animation
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "0 */6 * 3,4,5 *" # every 6 hours, from March to May
- cron: "0 */6 * 6,7,8 *" # every 6 hours, from June to August
- cron: "0 */6 * 9,10,11 *" # every 6 hours, from September to November
- cron: "0 */6 * 12,1,2 *" # every 6 hours, from December to February
jobs:
generate:
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Set current month as environment variable
run: echo "MONTH=$(date +'%m')" >> $GITHUB_ENV
# winter theme
- name: generate github-contribution-grid-snake.svg
if: github.event.schedule == '0 */6 * 12,1,2 *' || ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && contains('12 01 02', env.MONTH))
uses: Platane/snk/svg-only@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/github-contribution-grid-snake.svg?color_snake=#66ec48&color_dots=#a3c4d4,#b3e5fc,#4fc3f7,#039be5,#01579b
dist/github-contribution-grid-snake-dark.svg?color_snake=#66ec48&color_dots=#27363d,#b3e5fc,#4fc3f7,#039be5,#01579b
# spring theme
- name: generate github-contribution-grid-snake.svg
if: github.event.schedule == '0 */6 * 3,4,5 *' || ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && contains('03 04 05', env.MONTH))
uses: Platane/snk/svg-only@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/github-contribution-grid-snake.svg?color_snake=#66ec48&color_dots=#a3c4d4,#f8bbd0,#f06292,#e91e63,#880e4f
dist/github-contribution-grid-snake-dark.svg?color_snake=#66ec48&color_dots=#27363d,#f8bbd0,#f06292,#e91e63,#880e4f
# summer theme
- name: generate github-contribution-grid-snake.svg
if: github.event.schedule == '0 */6 * 6,7,8 *' || ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && contains('06 07 08', env.MONTH))
uses: Platane/snk/svg-only@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/github-contribution-grid-snake.svg?color_snake=#66ec48&color_dots=#a3c4d4,#ffecb3,#ffd54f,#ffb300,#ff6f00
dist/github-contribution-grid-snake-dark.svg?color_snake=#66ec48&color_dots=#27363d,#ffecb3,#ffd54f,#ffb300,#ff6f00
# autumn theme
- name: generate github-contribution-grid-snake.svg
if: github.event.schedule == '0 */6 * 9,10,11 *' || ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && contains('09 10 11', env.MONTH))
uses: Platane/snk/svg-only@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/github-contribution-grid-snake.svg?color_snake=#66ec48&color_dots=#a3c4d4,#fdf156,#ff6f01,#fd2f24,#811d5e
dist/github-contribution-grid-snake-dark.svg?color_snake=#66ec48&color_dots=#27363d,#fdf156,#ff6f01,#fd2f24,#811d5e
# push the content of <build_dir> to a branch
# the content will be available at https://raw.githubusercontent.com/<github_user>/<repository>/<target_branch>/<file> , or as github page
- name: push github-contribution-grid-snake.svg to the output branch
uses: crazy-max/[email protected]
with:
build_dir: dist
commit_message: "👾 update sneek"
target_branch: snk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}