Getting Started with Campaigns
Quick Start
Section titled “Quick Start”Prerequisites:
- Repository with GitHub Agentic Workflows installed
- GitHub Actions enabled
- (Optional) GitHub Projects V2 board for tracking campaign progress
Create a campaign workflow:
- Create a new workflow file at
.github/workflows/my-campaign.md:
---name: My Campaignon: schedule: daily workflow_dispatch:
permissions: issues: read pull-requests: read
imports: - shared/campaign.md---
# My Campaign
Your campaign instructions here...-
Set up authentication:
-
For project access:
Terminal window gh aw secrets set GH_AW_PROJECT_GITHUB_TOKEN --value "YOUR_PROJECT_TOKEN"See GitHub Projects V2 Tokens for token setup.
-
For assigning work to Copilot (if your campaign uses
assignees: copilotorassign-to-agentsafe outputs):Terminal window gh aw secrets set GH_AW_AGENT_TOKEN --value "YOUR_AGENT_TOKEN"See Agent Assignment Tokens for token setup.
-
-
Compile and deploy:
gh aw compilegit add .github/workflows/my-campaign.md .github/workflows/my-campaign.lock.ymlgit commit -m "Add my campaign workflow"git pushThe imports: [shared/campaign.md] includes standard agent coordination rules and safe-output defaults.
Example: Dependabot Burner
Section titled “Example: Dependabot Burner”The Dependabot Burner workflow is a small but useful campaign - it demonstrates the essential campaign pattern with minimal complexity:
---name: Dependabot Burneron: schedule: daily skip-if-no-match: 'is:pr is:open author:app/dependabot' workflow_dispatch:
permissions: issues: read pull-requests: read
imports: - shared/campaign.md
project: https://github.com/orgs/githubnext/projects/144---# Dependabot Burner
- Find all open Dependabot PRs and add them to the project.- Create bundle issues for each runtime + manifest file.- Add bundle issues to the project and assign to Copilot.Key features:
- Imports orchestration - Uses
shared/campaign.mdfor standard rules - Scheduled execution - Runs daily to process new Dependabot PRs
- Smart discovery - Only runs if matching PRs exist (
skip-if-no-match) - Project tracking - Adds discovered items to GitHub Projects board
How it works
Section titled “How it works”The campaign workflow:
- Imports standard agent coordination rules from
shared/campaign.md - Runs on schedule to discover work items
- Processes items according to your instructions
- Updates the GitHub Project board with progress
- Reports status via project status updates
Next Steps
Section titled “Next Steps”- Project Tracking Example - Complete guide with examples
- Safe Outputs Reference - Project operations documentation