A programmable GitHub bot for automated commits.
The goal of this project is to provide a single, auditable automation identity for the libnudget organization. Instead of hardcoding bot credentials across multiple repositories, this repo centralizes the bot configuration and provides reusable actions.
This bot is designed for students learning about GitHub Actions and automation. It demonstrates how to create a reusable commit action that can be consumed by any repository.
libnudget bot is an automated commit identity for the libnudget organization. It allows repositories to make commits using a consistent bot identity without hardcoding credentials.
Key features:
- Reusable GitHub Action for commits
- Configurable bot identity via environment variables
- Custom avatar support through Gravatar
- No infrastructure required
- Single source of truth for bot behavior
The bot uses the following identity:
| Field | Value |
|---|---|
| Name | libnudget[bot] |
$BOT_EMAIL (configurable) |
The identity is set in each script:
git config user.name "libnudget[bot]"
git config user.email "$BOT_EMAIL"This ensures all commits from the bot are consistent and traceable.
The system works in two ways:
When used as a GitHub Action:
- Repository configures
BOT_EMAILin GitHub secrets/variables - Workflow calls the reusable action
- Action sets git config using the email
- Commit is made with bot identity
- GitHub links email to Gravatar, displaying the avatar
- uses: libnudget/bot/actions/commit@v1
with:
message: "chore: update dependencies"For local development:
- Set
BOT_EMAILenvironment variable - Run configuration script
- Make commits normally
export BOT_EMAIL="your@email.com"
./scripts/configure-git.sh
git commit -m "chore: update file"Add to your workflow:
name: automated commit
on:
workflow_dispatch:
jobs:
commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: libnudget/bot/actions/commit@v1
with:
message: "chore: automated update"
env:
BOT_EMAIL: ${{ vars.BOT_EMAIL }}Requires setting BOT_EMAIL in repository settings.
export BOT_EMAIL="your@email.com"
./scripts/configure-git.sh./scripts/commit.sh "chore: your message"./scripts/release.sh v1.0.0- Go to repository Settings
- Navigate to Secrets and variables → Actions
- Add new variable:
- Name:
BOT_EMAIL - Value: your Gravatar email
- Name:
| Variable | Required | Description |
|---|---|---|
BOT_EMAIL |
Yes | Email for commit identity and avatar |
Set locally:
export BOT_EMAIL="your@email.com"bot/
├── .github/workflows/
│ └── bot-self-test.yml # Self-test workflow
├── actions/commit/
│ ├── action.yml # Action definition
│ ├── entrypoint.sh # Action logic
│ └── README.md # Action documentation
├── scripts/
│ ├── configure-git.sh # Set bot identity
│ ├── commit.sh # Make commits
│ └── release.sh # Create releases
├── docs/
│ └── IDENTITY.md # Identity documentation
├── PRIVACY.md # Privacy policy
└── README.md # This file
The bot avatar is fetched from Gravatar using the commit email.
- Register at gravatar.com
- Add the email you configured as
BOT_EMAIL - Upload your desired avatar
GitHub links commits to Gravatar using the email address:
commit email → Gravatar lookup → display avatar
This means any email registered with Gravatar will display that avatar on commits.
This bot only performs automated commits on behalf of the libnudget organization.
- Creates commits in repositories where it is configured
- Uses a dedicated identity for all automated actions
- Does not collect, store, or process any personal data
- All activity is limited to git commits within the organization
- No external data collection
- No third-party services receive data from this bot
For any questions about this bot's behavior, please open an issue in the repository.
This project is designed for educational purposes. Students can learn how to:
- Create reusable GitHub Actions
- Configure automated commit identities
- Set up Gravatar integration
- Build automation tooling
Feel free to fork and modify for your own use cases!