Generate Snake #1870
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
# 커밋 먹는 뱀 그래프 생성을 위한 GitHub Action🐍 | |
name: Generate Snake | |
# Action이 언제 구동될지 결정 | |
on: | |
schedule: | |
# 6시간마다 한 번(수정 가능) | |
- cron: "0 */6 * * *" | |
# 자동으로 Action이 실행되도록 함 | |
workflow_dispatch: | |
jobs: | |
generate: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: Platane/snk@v3 | |
with: | |
github_user_name: ${{ github.repository_owner }} | |
outputs: | | |
dist/github-contribution-grid-snake.svg | |
dist/github-contribution-grid-snake-dark.svg?palette=github-dark | |
dist/github-contribution-grid-snake.gif?color_snake=orange&color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9 | |
- name: ensure the generated file exists | |
run: | | |
ls dist | |
test -f dist/github-contribution-grid-snake.svg | |
test -f dist/github-contribution-grid-snake-dark.svg | |
test -f dist/github-contribution-grid-snake.gif | |
- name: push github-contribution-grid-snake.svg to the output branch | |
uses: crazy-max/[email protected] | |
with: | |
target_branch: output | |
build_dir: dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |