A collection of reusable development components including GitHub Actions workflows, templates, and coding standards for consistent development practices across projects.
This toolkit contains:
- GitHub Actions Workflows: Reusable CI/CD workflows for consistent automation
- Dependabot Templates: Standardized dependency management configurations
- Development Standards: (Coming soon) Coding guidelines and best practices
Runs linting, testing, and building steps for your project. Supports npm, pnpm, and yarn.
Create a workflow file in your repository (e.g., .github/workflows/ci.yml):
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate:
uses: YOUR_USERNAME/toolkit/.github/workflows/validate.yml@main
with:
node-version: '20.x'
package-manager: 'pnpm'
lint-script: 'lint'
test-script: 'test'
build-script: 'build'| Input | Description | Required | Default |
|---|---|---|---|
node-version |
Node.js version to use | No | 20.x |
package-manager |
Package manager (npm, pnpm, or yarn) | No | npm |
lint-script |
npm script for linting | No | lint |
test-script |
npm script for testing | No | test |
build-script |
npm script for building | No | build |
skip-lint |
Skip linting step | No | false |
skip-test |
Skip testing step | No | false |
skip-build |
Skip build step | No | false |
Automatically merges Dependabot PRs after all checks pass.
Create a workflow file in your repository (e.g., .github/workflows/auto-merge-dependabot.yml):
name: Auto-merge Dependabot
on:
pull_request:
jobs:
auto-merge:
uses: YOUR_USERNAME/toolkit/.github/workflows/auto-merge-dependabot.yml@main
with:
merge-method: 'squash'
exclude: 'major'| Input | Description | Required | Default |
|---|---|---|---|
merge-method |
Merge method (squash, merge, rebase) | No | squash |
exclude |
Exclude major, minor, or patch updates | No | major |
Dependabot configuration files must exist in each repository (they cannot be referenced externally like workflows). This repository provides templates and a sync script to make it easy to maintain consistent Dependabot configurations across all your repositories.
dependabot-npm.yml- For Node.js/npm projects with smart grouping and auto-merge settingsdependabot-github-actions.yml- For monitoring GitHub Actions versions
Use the provided sync-dependabot.sh script to copy a template to your repository:
# Sync npm template (default)
./sync-dependabot.sh ~/code/my-repo
# Sync npm template (explicit)
./sync-dependabot.sh ~/code/my-repo npm
# Sync GitHub Actions template
./sync-dependabot.sh ~/code/my-repo github-actionsThe script will:
- Create a backup of any existing
dependabot.ymlfile - Copy the selected template to
.github/dependabot.yml - Provide next steps for committing the changes
If you prefer to copy manually:
- Browse the
templates/directory - Copy your desired template to your repository's
.github/dependabot.yml - Customize as needed for your project
Simply reference the workflows in your repository as shown in the usage examples above. No package installation needed.
Clone this repository and use the sync script:
git clone https://github.com/YOUR_USERNAME/toolkit.git
cd toolkit
./sync-dependabot.sh ~/path/to/your/repo npmHere's a complete setup for a repository:
.github/workflows/ci.yml:
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
validate:
uses: YOUR_USERNAME/toolkit/.github/workflows/validate.yml@main
with:
node-version: '20.x'
package-manager: 'pnpm'.github/workflows/auto-merge-dependabot.yml:
name: Auto-merge Dependabot
on:
pull_request:
jobs:
auto-merge:
needs: [validate] # Wait for CI to pass
uses: YOUR_USERNAME/toolkit/.github/workflows/auto-merge-dependabot.yml@main.github/dependabot.yml:
# Copy from this repository's .github/dependabot.yml- Pin workflows to a specific version/tag for stability:
@v1.0.0 - Use
@mainto always get the latest version - Combine the validate workflow with auto-merge for automated dependency management
- Customize script names based on your package.json scripts
MIT