Skip to content

Commit

Permalink
chore: add merge_group to CI workflow (#813)
Browse files Browse the repository at this point in the history
Related to #812.
  • Loading branch information
cgrindel authored Dec 17, 2023
1 parent 9ff3554 commit 74f3769
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ name: Continuous Integration
pull_request:
branches:
- main
merge_group: {}
schedule:
- cron: 14 11 * * *
concurrency:
Expand Down
3 changes: 3 additions & 0 deletions tools/generate_ci_workflow/internal/github/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func NewWorkflowFromYAML(b []byte) (*Workflow, error) {
// WorkflowTriggers represents the triggers for a workflow.
type WorkflowTriggers struct {
PullRequest PullRequestEvent `yaml:"pull_request"`
MergeGroup MergeGroup `yaml:"merge_group"`
Schedule []Schedule `yaml:"schedule,omitempty"`
}

Expand All @@ -36,6 +37,8 @@ type PullRequestEvent struct {
Branches []string `yaml:"branches,omitempty"`
}

type MergeGroup struct{}

// Schedule is the cron schedule for a workflow.
type Schedule struct {
Cron string `yaml:"cron"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ name: Continuous Integration
on:
pull_request:
branches: [ main ]
merge_group:
schedule:
# Every day at 11:14 UTC.
- cron: '14 11 * * *'
Expand Down

0 comments on commit 74f3769

Please sign in to comment.