Skip to content

Draw Commit Graph

Draw Commit Graph #3

Workflow file for this run

name: Draw Commit Graph
on:
schedule:
- cron: "0 0 2 1 *" # Every year on January 2nd at Midnight
workflow_dispatch: # Manual trigger
jobs:
draw:
runs-on: ubuntu-latest
permissions:
contents: write # Important: allows pushing
steps:
- name: Checkout main repo (Rust code)
uses: actions/checkout@v4
- name: Checkout art repository
uses: actions/checkout@v4
with:
repository: web-dev-sam/gh-crab-result
token: ${{ secrets.GH_CRAB_TOKEN }}
path: art-repo
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Configure Git
working-directory: art-repo
run: |
git config user.name "Samuel Braun"
git config user.email "sam@webry.com"
- name: Build and run drawer
run: |
cargo build --release
./target/release/gh-crab art-repo/
- name: Push changes
working-directory: art-repo
run: |
git push --force origin main
env:
GITHUB_TOKEN: ${{ secrets.GH_CRAB_TOKEN }}