Skip to content

taberj-git/.github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Default Community Health Files and Workflow Templates

This repository contains default community health files and reusable workflow templates for all repositories in this organization/account.

What's Included

Workflow Templates

Reusable GitHub Actions workflows that can be added to any repository:

1. Auto-merge Workflow (workflow-templates/auto-merge.yml)

Automatically merges pull requests to the dev branch when:

  • PR has the auto-merge label
  • All CI/CD checks pass
  • PR is not in draft mode

Usage:

  1. Go to Actions → New workflow in any repository
  2. Find "Auto-merge Workflow" under workflows created by this account
  3. Click Configure and commit

Or manually copy:

curl -o .github/workflows/auto-merge.yml \
  https://raw.githubusercontent.com/taberj-git/.github/main/workflow-templates/auto-merge.yml

2. Auto-promote to Main (workflow-templates/auto-promote.yml)

Creates pull requests to promote the dev branch to main for production releases.

Triggers:

  • Manual: Via Actions UI or gh workflow run
  • Scheduled: Every Sunday at midnight UTC (configurable)

Usage:

# Manual trigger
gh workflow run "Auto-promote to Main" -f reason="Release v1.2.0"

# Or add via Actions UI

Using These Templates

Method 1: Via GitHub UI

  1. Navigate to any repository
  2. Click the Actions tab
  3. Click New workflow
  4. Scroll to "Workflows created by taberj-git"
  5. Click Configure on the desired workflow
  6. Commit the file

Method 2: Via GitHub CLI

# List available templates
gh api -H "Accept: application/vnd.github+json" \
  /repos/taberj-git/.github/contents/workflow-templates

# Download template
gh api repos/taberj-git/.github/contents/workflow-templates/auto-merge.yml \
  --jq '.content' | base64 -d > .github/workflows/auto-merge.yml

Method 3: Manual Copy

cd your-repository/.github/workflows

# Auto-merge workflow
curl -O https://raw.githubusercontent.com/taberj-git/.github/main/workflow-templates/auto-merge.yml

# Auto-promote workflow
curl -O https://raw.githubusercontent.com/taberj-git/.github/main/workflow-templates/auto-promote.yml

git add .
git commit -m "Add automated merge workflows"
git push

Setup Requirements

Labels

Create these labels in your repository for the workflows to function:

gh label create "auto-merge" --color "0E8A16" \
  --description "Automatically merge when checks pass"

gh label create "auto-promote" --color "1D76DB" \
  --description "Ready to promote to production"

GitHub Actions Permissions

Go to Settings → Actions → General → Workflow permissions:

  • ✅ Read and write permissions
  • ✅ Allow GitHub Actions to create and approve pull requests

Branch Protection

For auto-merge to work:

  • ✅ Enable "Allow auto-merge" in branch protection settings
  • Set "Required approvals" to 0 (for solo projects)
  • Configure required status checks (tests, build, etc.)

Workflow Behavior

Auto-merge Workflow

PR Created → Label with 'auto-merge' → CI/CD Runs → All Pass → Auto-merge
                                                    ↓
                                              Any Fail → No merge, comment on PR

Auto-promote Workflow

Trigger (manual/schedule) → Check if dev ahead of main → Create/Update PR → Add 'auto-merge' label → Merged by auto-merge workflow

Customization

Change Merge Strategy

Edit the workflow file, line with merge_method:

merge_method: 'squash'  # Options: merge, squash, rebase

Require Approval

Edit the auto-merge workflow to require reviews before merging.

Change Schedule

Edit the auto-promote workflow cron schedule:

schedule:
  - cron: '0 0 1 * *'  # First day of month at midnight

Maintenance

To update these templates:

  1. Edit files in this repository
  2. Commit and push changes
  3. Workflows in other repos will use the latest version when reconfigured

Support

For issues or questions about these workflows:

  1. Check the workflow logs in the Actions tab
  2. Review the setup requirements above
  3. Ensure labels and permissions are configured correctly

Links

About

Default workflows, templates, and community health files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors