forked from Platane/snk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1577a98
commit 5f6cb9b
Showing
1 changed file
with
27 additions
and
60 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,45 @@ | ||
name: main | ||
name: manual run | ||
|
||
on: [push] | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
generate: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
- uses: Platane/snk/svg-only@v3 | ||
with: | ||
cache: yarn | ||
node-version: 20 | ||
- run: yarn install --frozen-lockfile | ||
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 | ||
- 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] | ||
- uses: Platane/snk@v3 | ||
with: | ||
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 | ||
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 | ||
- name: Ensure the generated files exist | ||
- name: ensure the generated file exists | ||
run: | | ||
ls dist | ||
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/only-svg/github-contribution-grid-snake.svg | ||
test -f dist/only-svg/github-contribution-grid-snake-dark.svg | ||
- name: Generate dark-themed snake animation | ||
uses: Platane/[email protected] | ||
with: | ||
github_user_name: OrganicBeetle | ||
palette: github-dark | ||
color_snake: "#800080" # Teal | ||
color_dots_1: "#00FF00" # Coral | ||
color_dots_2: "#FF00FF" # 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 | ||
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 | ||
- uses: crazy-max/[email protected] | ||
- name: push github-contribution-grid-snake.svg to the output branch | ||
uses: crazy-max/[email protected] | ||
with: | ||
target_branch: output-dark | ||
target_branch: manual-run-output | ||
build_dir: dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |