1. A workflow calls a reusable workflow defined in a different repository. The reusable workflow declares an input `deploy_env` (type: string, required: true) and an output `release_url`. The caller workflow must pass the input and use the output in a subsequent job. Which THREE statements about this cross-repository reusable workflow call are correct?
- A. The `uses` key must reference the reusable workflow with the syntax `{owner}/{repo}/.github/workflows/{file}@{ref}`.✓ Correct
- B. The caller can pass `deploy_env` under the `with` key of the `uses` step.✓ Correct
- C. The reusable workflow's outputs are accessible in the caller via `needs.<job_id>.outputs.<output_name>`.✓ Correct
- D. The caller workflow must be in the same organization as the reusable workflow for cross-repo calls to work.
- E. If the reusable workflow uses `secrets: inherit` internally, the caller automatically forwards all its secrets.
- F. Outputs from the reusable workflow are directly available as environment variables in the caller job without any `needs` reference.
Explanation
Cross-repo reusable workflow calls require the full `{owner}/{repo}/.github/workflows/{file}@{ref}` syntax (e.g., `@main` or `@v1`). — Inputs defined in the called workflow are passed via the `with` key in the caller, just like action inputs. — Outputs declared by the reusable workflow are surfaced to the caller through the standard `needs.<job_id>.outputs.<output_name>` expression, allowing downstream jobs to consume them. — Cross-repository reusable workflow calls work across organizations as long as the called workflow's repository visibility and 'Allow reuse' settings permit it; they are not restricted to the same organization. — `secrets: inherit` in the caller forwards the caller's secrets to the called workflow; it is a caller-side setting, not an internal setting of the reusable workflow. — Outputs are NOT automatically available as environment variables; they must be explicitly referenced via `needs`.