docs: add trigger file + workflow_call pattern to CentralRepoOps#19693
docs: add trigger file + workflow_call pattern to CentralRepoOps#19693
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot show cross repo example (workflow_call into central repo workflow) |
…section Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added in 8c67357. A new "Calling the Orchestrator from Another Repository" subsection shows how a trigger file in a target repo can call back into the central orchestrator via cross-repo jobs:
trigger:
uses: my-org/central-ops/.github/workflows/dependabot-rollout-orchestrator.lock.yml@main
with:
reason: "${{ github.event_name }} in ${{ github.repository }}"
secrets:
GH_AW_READ_ORG_TOKEN: ${{ secrets.GH_AW_READ_ORG_TOKEN }}The section also notes the key constraints: same-org requirement and no Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Adds documentation for a “trigger file + workflow_call” pattern in CentralRepoOps so orchestrators can be invoked by GitHub events (not only schedules) without recompiling agent logic.
Changes:
- Documented adding
on.workflow_callto an orchestrator and using a stable.github/workflows/*-trigger.ymlto invoke the compiled*.lock.yml. - Added a cross-repo
workflow_callexample and a schedule-vs-trigger trade-off table. - Regenerated many
*.lock.ymlworkflows (tool description text formatting changes).
Reviewed changes
Copilot reviewed 77 out of 77 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/src/content/docs/patterns/central-repo-ops.mdx | Adds the new “trigger file + workflow_call” documentation section and examples. |
| docs/src/content/docs/agent-factory-status.mdx | Adds the “Constraint Solving — Problem of the Day” workflow to the status table. |
| .github/workflows/workflow-skill-extractor.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/workflow-normalizer.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/workflow-health-manager.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/weekly-safe-outputs-spec-review.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/weekly-editors-health-check.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/video-analyzer.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/unbloat-docs.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/ubuntu-image-analyzer.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/tidy.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/test-create-pr-error-handling.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/technical-doc-writer.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/super-linter.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/step-name-alignment.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/stale-repo-identifier.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/smoke-update-cross-repo-pr.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/smoke-temporary-id.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/smoke-project.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/smoke-multi-pr.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/smoke-gemini.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/smoke-create-cross-repo-pr.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/smoke-copilot.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/smoke-copilot-arm.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/smoke-codex.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/smoke-claude.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/semantic-function-refactor.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/security-compliance.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/refiner.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/q.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/poem-bot.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/plan.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/layout-spec-maintainer.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/jsweep.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/issue-triage-agent.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/instructions-janitor.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/gpclean.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/go-pattern-detector.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/go-logger.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/glossary-maintainer.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/github-mcp-tools-report.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/functional-pragmatist.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/duplicate-code-detector.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/discussion-task-miner.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/dictation-prompt.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/developer-docs-consolidator.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/dependabot-go-checker.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/delight.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/deep-report.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/dead-code-remover.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-workflow-updater.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-testify-uber-super-expert.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-team-status.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-syntax-error-quality.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-security-red-team.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-safe-outputs-conformance.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-safe-output-optimizer.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-rendering-scripts-verifier.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-multi-device-docs-tester.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-mcp-concurrency-analysis.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-file-diet.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-doc-updater.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-doc-healer.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-cli-tools-tester.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-cli-performance.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/daily-architecture-diagram.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/contribution-check.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/code-simplifier.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/code-scanning-fixer.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/cloclo.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/cli-version-checker.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/cli-consistency-checker.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/ci-doctor.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/breaking-change-checker.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/bot-detection.lock.yml | Regenerated lock workflow (description formatting for labels list). |
| .github/workflows/ai-moderator.lock.yml | Regenerated lock workflow (description formatting for allowed-labels list). |
| .github/workflows/agent-performance-analyzer.lock.yml | Regenerated lock workflow (description formatting for labels list). |
Comments suppressed due to low confidence (2)
docs/src/content/docs/patterns/central-repo-ops.mdx:325
- The comment says "Trigger when a repository is labeled" but the workflow uses the
issuesevent (issue labels). Unless you’re intentionally using issues as a proxy for repos, this should be reworded to avoid implying there’s a repository-label event.
docs/src/content/docs/patterns/central-repo-ops.mdx:378 - The note on cross-repository
workflow_callis too strict: reusable workflows can be called cross-repo under a few different conditions (for example, public workflows can be reused across organizations, and private/internal reuse depends on org/enterprise settings). Suggest rephrasing to reflect the actual permission model rather than stating it "requires" the same org.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| uses: my-org/central-ops/.github/workflows/dependabot-rollout-orchestrator.lock.yml@main | ||
| with: |
There was a problem hiding this comment.
The cross-repo uses: example pins to @main, which can introduce breaking changes into callers unexpectedly. Since this pattern is aimed at stable central orchestration, consider showing a tag or commit SHA pin here (similar to the guidance in docs/src/content/docs/reference/imports.md about using semantic versions for production).
This issue also appears on line 376 of the same file.
| workflow_dispatch: | ||
| inputs: | ||
| reason: | ||
| description: "Reason for manual trigger" | ||
| required: false | ||
| default: "manual" | ||
|
|
||
| jobs: | ||
| trigger: | ||
| uses: ./.github/workflows/dependabot-rollout-orchestrator.lock.yml | ||
| with: | ||
| reason: ${{ github.event_name }} | ||
| secrets: inherit |
There was a problem hiding this comment.
In the trigger workflow example, workflow_dispatch defines an input reason, but the call always passes reason: ${{ github.event_name }}. This drops the user-provided reason on manual runs. Consider passing the dispatch input when present (and falling back to github.event_name for non-dispatch events).
This issue also appears on line 322 of the same file.
| ## Richer Triggers with a Trigger File | ||
|
|
||
| Embedding a `schedule:` trigger directly in the orchestrator is the simplest setup, but it limits the orchestrator to time-based execution only. A **trigger file** — a plain, hand-authored GitHub Actions workflow — solves this by separating the trigger definition from the agent logic: | ||
|
|
||
| - The compiled orchestrator exposes a `workflow_call` trigger. | ||
| - A stable, rarely-changing `.yml` file defines the actual GitHub events that kick off the run. | ||
| - The trigger file calls the compiled orchestrator via `workflow_call`, forwarding any inputs and secrets. |
There was a problem hiding this comment.
The PR title/description focuses on docs changes, but this PR also updates a large number of generated *.lock.yml workflows. If that churn is intentional (e.g., recompilation with updated formatting), it should be called out explicitly in the PR description to help reviewers understand the scope and review strategy.
CentralRepoOps examples only showed
schedule:as the orchestrator trigger, leaving no documented path to react to GitHub events (issues, pushes, labels) without recompiling the agentic workflow.Changes
central-repo-ops.mdxcovering:workflow_callto the orchestrator frontmatter (alongsideschedule:) so it can be called externally.ymlthat references the compiled.lock.ymland usessecrets: inherit— this file survives recompiles unchangedworkflow_callexample showing how a trigger file in a target repository can call back into the orchestrator in the central control repoPattern in brief
Same-repo trigger file (lives alongside the orchestrator in the central repo):
Cross-repo trigger file (lives in a target repo, calls back into the central repo):
The key insight: the trigger file is plain YAML (no compilation), so trigger conditions change independently of the agent logic. Cross-repo calls require secrets to be listed explicitly (
secrets: inheritis not supported).Warning
Custom agent used: technical-doc-writer
AI technical documentation writer for GitHub Actions library using GitHub Docs voice
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.