Skip to content

Downstream jobs read needs.activation.outputs.target_repo, but activation does not declare it in most workflows #67175

Description

@jaroslawgajewski

Summary

Jobs downstream of activation (agent, conclusion, safe_outputs) read needs.activation.outputs.target_repo and target_repo_name, for example:

- name: Derive GitHub App owner
  id: github-mcp-app-token-owner
  env:
    GH_AW_TARGET_REPOSITORY: ${{ needs.activation.outputs.target_repo }}

In most compiled workflows the activation job does not declare a target_repo output at all. Its outputs: list is artifact_prefix, aw_context, body, comment_id, comment_repo, daily_ai_credits_*, engine_id, lockdown_check_failed, model, oauth_token_check_failed, secret_verification_result, setup-*, text, title. The reference therefore evaluates to an empty string, and the step fails:

[gh-aw] Unable to derive GitHub App owner from repository:
[gh-aw] Normalized repository candidate:
##[error]Process completed with exit code 1.

Evidence (compiler v0.91.6, unpatched, whole fleet compiled)

Fleet Lock files that reference needs.activation.outputs.target_repo Of those, activation declares it References without a fallback
GitHub Enterprise Cloud (data residency) 40 of 44 5 62
github.com 24 of 27 4 36

Two earlier fix attempts that added these fallbacks, #39742 (June) and #66678 (October, "Avoid GHES masking of cross-job workflow outputs", linked to #38345), were closed without merging, so the compiler output has not changed.

Expected

Either every reference carries || github.repository (and target_repo_name carries || github.event.repository.name), or activation always declares the output.

Workaround today

A post-compile rewrite adds the two fallbacks to every reference in both fleets.

Related

Same area as #38345 (cross-job outputs on GHES), which is still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions