Skip to content

Commit

Permalink
Update manual-run.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
OrganicBeetle authored Jun 30, 2024
1 parent 4aebf15 commit 6b15ef0
Showing 1 changed file with 60 additions and 27 deletions.
87 changes: 60 additions & 27 deletions .github/workflows/manual-run.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,78 @@
name: manual run
name: main

on:
workflow_dispatch:
on: [push]

jobs:
generate:
permissions:
contents: write
test:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: Platane/snk/svg-only@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/only-svg/github-contribution-grid-snake.svg
dist/only-svg/github-contribution-grid-snake-dark.svg?palette=github-dark
cache: yarn
node-version: 20
- run: yarn install --frozen-lockfile

- uses: Platane/snk@v3
- run: npm run type
- run: npm run lint
- run: npm run test --ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

generate-snake:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Generate snake animation
uses: Platane/[email protected]
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/docker/github-contribution-grid-snake.svg
dist/docker/github-contribution-grid-snake-dark.svg?palette=github-dark
dist/docker/github-contribution-grid-snake.gif?color_snake=orange&color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9
github_user_name: OrganicBeetle
color_snake: "#008080" # Teal
color_dots_1: "#FF7F50" # Coral
color_dots_2: "#FFD700" # Gold
gif_out_path: dist/github-contribution-grid-snake.gif
svg_out_path: dist/github-contribution-grid-snake.svg

- name: ensure the generated file exists
- name: Ensure the generated files exist
run: |
ls dist
test -f dist/only-svg/github-contribution-grid-snake.svg
test -f dist/only-svg/github-contribution-grid-snake-dark.svg
test -f dist/github-contribution-grid-snake.svg
test -f dist/github-contribution-grid-snake.gif
- uses: crazy-max/[email protected]
with:
target_branch: output
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

generate-snake-dark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

test -f dist/docker/github-contribution-grid-snake.svg
test -f dist/docker/github-contribution-grid-snake-dark.svg
test -f dist/docker/github-contribution-grid-snake.gif
- name: Generate dark-themed snake animation
uses: Platane/[email protected]
with:
github_user_name: OrganicBeetle
palette: github-dark
color_snake: "#008080" # Teal
color_dots_1: "#FF7F50" # Coral
color_dots_2: "#FFD700" # Gold
gif_out_path: dist/github-contribution-grid-snake-dark.gif
svg_out_path: dist/github-contribution-grid-snake-dark.svg

- name: Ensure the generated files exist
run: |
ls dist
test -f dist/github-contribution-grid-snake-dark.svg
test -f dist/github-contribution-grid-snake-dark.gif
- name: push github-contribution-grid-snake.svg to the output branch
uses: crazy-max/[email protected]
- uses: crazy-max/[email protected]
with:
target_branch: manual-run-output
target_branch: output-dark
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6b15ef0

Please sign in to comment.