mirror of
https://github.com/bdrtr/bdrtr.git
synced 2025-11-08 19:46:03 +01:00
Update main.yml
This commit is contained in:
parent
9bfeb88fb9
commit
8f95fe6e8b
1 changed files with 67 additions and 17 deletions
84
.github/workflows/main.yml
vendored
84
.github/workflows/main.yml
vendored
|
|
@ -1,31 +1,81 @@
|
||||||
|
GitHub Action for generating a contribution graph with a snake eating your contributions.
|
||||||
|
|
||||||
|
|
||||||
name: Generate Snake
|
name: Generate Snake
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Controls when the action will run. This action runs every 6 hours.
|
||||||
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
|
||||||
schedule:
|
schedule:
|
||||||
# every 6 hours
|
|
||||||
|
# every 6 hours
|
||||||
|
|
||||||
- cron: "0 */6 * * *"
|
- cron: "0 */6 * * *"
|
||||||
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
This command allows us to run the Action automatically from the Actions tab.
|
||||||
|
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
The sequence of runs in this workflow:
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
# This workflow contains a single job called "build"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
|
||||||
|
# The type of runner that the job will run on
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
|
||||||
# Checkout repository
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# Generate the snake
|
|
||||||
- uses: Platane/snk@master
|
|
||||||
id: snake-gif
|
|
||||||
with:
|
|
||||||
github_user_name: bdrtr
|
|
||||||
gif_out_path: dist/github-contribution-grid-snake.gif
|
|
||||||
svg_out_path: dist/github-contribution-grid-snake.svg
|
|
||||||
|
|
||||||
# Check the status of the build
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
- run: git status
|
steps:
|
||||||
|
|
||||||
# Push the changes to master/main branch
|
# Checks repo under $GITHUB_WORKSHOP, so your job can access it
|
||||||
- name: Push changes
|
- uses: actions/checkout@v2
|
||||||
uses: ad-m/github-push
|
|
||||||
|
# Generates the snake
|
||||||
|
- uses: Platane/snk@master
|
||||||
|
id: snake-gif
|
||||||
|
with:
|
||||||
|
github_user_name: mishmanners
|
||||||
|
# these next 2 lines generate the files on a branch called "output". This keeps the main branch from cluttering up.
|
||||||
|
gif_out_path: dist/github-contribution-grid-snake.gif
|
||||||
|
svg_out_path: dist/github-contribution-grid-snake.svg
|
||||||
|
|
||||||
|
# show the status of the build. Makes it easier for debugging (if there's any issues).
|
||||||
|
- run: git status
|
||||||
|
|
||||||
|
# Push the changes
|
||||||
|
- name: Push changes
|
||||||
|
uses: ad-m/github-push-action@master
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
branch: master
|
||||||
|
force: true
|
||||||
|
|
||||||
|
- uses: crazy-max/ghaction-github-pages@v2.1.3
|
||||||
|
with:
|
||||||
|
# the output branch we mentioned above
|
||||||
|
target_branch: output
|
||||||
|
build_dir: dist
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue