Pac-Man Contribution Graph Game
Transform your GitHub or GitLab contribution graph into an interactive Pac-Man game!
Usage
- In the repository, create a
.github/workflows/directory. - Add
pacman-contribution.ymlfile with the following content:
yaml
name: generate pacman game
on:
# Run automatically every 24 hours
schedule:
- cron: "0 */24 * * *"
# Allows manual triggering
workflow_dispatch:
# Runs on every push to the main branch
push:
branches:
- main
jobs:
generate:
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: generate pacman-contribution-graph.svg
uses: abozanona/pacman-contribution-graph@main
with:
github_user_name: ${{ github.repository_owner }}
# Push the generated SVG to the output branch
- name: push pacman-contribution-graph.svg to the output branch
uses: crazy-max/ghaction-github-pages@v3.1.0
with:
target_branch: output
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- In your repository, create or edit the
README.mdfile to include:
markdown
## My Contribution Graph
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/[Owner]/[Repo]/output/pacman-contribution-graph-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/[Owner]/[Repo]/output/pacman-contribution-graph.svg">
<img alt="pacman contribution graph" src="https://raw.githubusercontent.com/[Owner]/[Repo]/output/pacman-contribution-graph.svg">
</picture>Parameters
Click to show/close parameters
| Name | Type | Required | Default | Description | More Description |
|---|---|---|---|---|---|
github_user_name | string | true | GitHub username | ||
github_token | string | GitHub token |
Examples
markdown
<!-- abozanona -->
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/abozanona/abozanona/output/pacman-contribution-graph-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/abozanona/abozanona/output/pacman-contribution-graph.svg">
<img alt="pacman contribution graph" src="https://raw.githubusercontent.com/abozanona/abozanona/output/pacman-contribution-graph.svg">
</picture>