You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `target-ref`: Git ref (branch, tag, or SHA) to use when dispatching the workflow. In `workflow_call` relay scenarios this is auto-injected by the compiler from `needs.activation.outputs.target_ref`, ensuring the correct platform branch is used instead of the caller's `GITHUB_REF`.
3077
3078
- `allowed-repos`: Cross-repo allowlist (supports wildcards, e.g. `org/*`)
3078
3079
3079
3080
**Notes**:
3080
3081
- Requires ONLY `actions: write` permission (no `contents: read` needed)
3081
3082
- Target workflow must support `workflow_dispatch` trigger
3082
3083
- Workflow inputs are validated against target workflow's input schema
3083
3084
- Cross-repository dispatch requires appropriate `actions: write` permissions in the target repository
3085
+
- In `workflow_call` relay (CentralRepoOps) scenarios, the compiler automatically injects both `target-repo` and `target-ref` from `needs.activation.outputs.*` so the dispatch targets the correct platform repository and branch
Copy file name to clipboardExpand all lines: pkg/parser/schemas/main_workflow_schema.json
+27-7Lines changed: 27 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -5341,7 +5341,7 @@
5341
5341
"items": {
5342
5342
"type": "string"
5343
5343
},
5344
-
"description": "Exclusive allowlist of glob patterns. When set, every file in the patch must match at least one pattern — files outside the list are always refused, including normal source files. This is a restriction, not an exception: setting allowed-files: [\".github/workflows/*\"] blocks all other files. To allow multiple sets of files, list all patterns explicitly. Acts independently of the protected-files policy; both checks must pass. To modify a protected file, it must both match allowed-files and be permitted by protected-files (e.g. protected-files: allowed). Supports * (any characters except /) and ** (any characters including /)."
5344
+
"description": "Exclusive allowlist of glob patterns. When set, every file in the patch must match at least one pattern \u2014 files outside the list are always refused, including normal source files. This is a restriction, not an exception: setting allowed-files: [\".github/workflows/*\"] blocks all other files. To allow multiple sets of files, list all patterns explicitly. Acts independently of the protected-files policy; both checks must pass. To modify a protected file, it must both match allowed-files and be permitted by protected-files (e.g. protected-files: allowed). Supports * (any characters except /) and ** (any characters including /)."
5345
5345
}
5346
5346
},
5347
5347
"additionalProperties": false,
@@ -6393,7 +6393,7 @@
6393
6393
"items": {
6394
6394
"type": "string"
6395
6395
},
6396
-
"description": "Exclusive allowlist of glob patterns. When set, every file in the patch must match at least one pattern — files outside the list are always refused, including normal source files. This is a restriction, not an exception: setting allowed-files: [\".github/workflows/*\"] blocks all other files. To allow multiple sets of files, list all patterns explicitly. Acts independently of the protected-files policy; both checks must pass. To modify a protected file, it must both match allowed-files and be permitted by protected-files (e.g. protected-files: allowed). Supports * (any characters except /) and ** (any characters including /)."
6396
+
"description": "Exclusive allowlist of glob patterns. When set, every file in the patch must match at least one pattern \u2014 files outside the list are always refused, including normal source files. This is a restriction, not an exception: setting allowed-files: [\".github/workflows/*\"] blocks all other files. To allow multiple sets of files, list all patterns explicitly. Acts independently of the protected-files policy; both checks must pass. To modify a protected file, it must both match allowed-files and be permitted by protected-files (e.g. protected-files: allowed). Supports * (any characters except /) and ** (any characters including /)."
6397
6397
}
6398
6398
},
6399
6399
"additionalProperties": false
@@ -6541,6 +6541,14 @@
6541
6541
"github-token": {
6542
6542
"$ref": "#/$defs/github_token",
6543
6543
"description": "GitHub token to use for dispatching workflows. Overrides global github-token if specified."
6544
+
},
6545
+
"target-repo": {
6546
+
"type": "string",
6547
+
"description": "Target repository in format 'owner/repo' for cross-repository workflow dispatch. When specified, the workflow will be dispatched to the target repository instead of the current one."
6548
+
},
6549
+
"target-ref": {
6550
+
"type": "string",
6551
+
"description": "Git ref (branch, tag, or SHA) to use when dispatching the workflow. For workflow_call relay scenarios this is auto-injected by the compiler from needs.activation.outputs.target_ref. Overrides the caller's GITHUB_REF."
6544
6552
}
6545
6553
},
6546
6554
"required": ["workflows"],
@@ -7659,7 +7667,13 @@
7659
7667
},
7660
7668
"dependencies": {
7661
7669
"description": "APM package references to install. Supports array format (list of package slugs) or object format with packages and isolated fields.",
Copy file name to clipboardExpand all lines: pkg/workflow/dispatch_workflow.go
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ type DispatchWorkflowConfig struct {
12
12
Workflows []string`yaml:"workflows,omitempty"`// List of workflow names (without .md extension) to allow dispatching
13
13
WorkflowFilesmap[string]string`yaml:"workflow_files,omitempty"`// Map of workflow name to file extension (.lock.yml or .yml) - populated at compile time
14
14
TargetRepoSlugstring`yaml:"target-repo,omitempty"`// Target repository for cross-repo dispatch (owner/repo or GitHub Actions expression)
15
+
TargetRefstring`yaml:"target-ref,omitempty"`// Target ref for cross-repo dispatch; overrides the caller's GITHUB_REF
0 commit comments