Skip to content

Expose apm-version as an import input on shared/apm.md #1829

Description

@anthonymastreanvae

Summary

Consumers vendor shared/apm.md (via gh aw add microsoft/apm/.github/workflows/shared/apm.md) and import it from their agentic workflows. The shared workflow pins the apm CLI version only through microsoft/apm-action's built-in default — it does not expose apm-version as an import input. To run a newer apm CLI than the action's default, a consumer must hand-edit the vendored shared/apm.md (the apm-version on both the Pack and Restore apm-action steps). That edit is fragile: gh aw update re-merges from upstream and --no-merge reverts it outright.

Please add apm-version to the import schema and thread it into both apm-action invocations, so consumers can set it from their own workflow's with: block.

Why this matters

The apm CLI version is not cosmetic — it changes what apm install/apm pack deliver. For example, older apm packs primitives only, while newer apm also carries package documentation/knowledge-base files that agents reference at runtime. Behavior fixes ship in the CLI too — e.g. skill-bundle relative-link rewriting (#1625, PR #1657) was broken for skills and fixed in a later release. Consumers who need any of this currently have no first-class way to opt into a newer CLI; they must patch a vendored file and re-patch it after every update.

Current state

shared/apm.md's import-schema exposes packages, app-id / private-key / owner / repositories, apps, and target — but not apm-version. Both apm-action steps (Pack and Restore) omit the apm-version input, so the CLI version falls through to the action's pinned default.

Proposed change

  1. Add to import-schema:
    apm-version:
      type: string
      required: false
      description: >
        apm CLI version for apm-action to install (e.g. '0.20.0'). Omit to use
        the action's pinned default. Pin explicitly for reproducibility.
  2. Thread it into both apm-action steps (they must match, so the pack and restore CLI versions can't skew):
    with:
      apm-version: ${{ github.aw.import-inputs.apm-version }}
      # ...existing inputs...

Consumers then set it cleanly in their import, with no vendored-file patching and no loss on gh aw update:

imports:
  - uses: shared/apm.md
    with:
      apm-version: '0.20.0'
      target: copilot
      packages:
        - example.ghe.com/<org>/<package>

Prior art

Note on the action ref

The microsoft/apm-action@<tag> ref itself can't be parameterized the same way (gh-aw SHA-pins the literal uses: ref at compile time), so bumping the action still means editing the vendored file or pulling a newer upstream shared/apm.md. Exposing apm-version covers the common case — a newer CLI on the existing action — without that edit, since the action accepts the input regardless.

Metadata

Metadata

Labels

area/ci-cdGitHub workflows, merge queue, gh-aw integrations, release pipeline.status/acceptedDirection approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).type/featureNew capability, new flag, new primitive.

Type

No type
No fields configured for issues without a type.

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions