A GitHub Action that installs APM (Agent Package Manager) and deploys agent primitives (instructions, prompts, skills, agents) into your CI workflows. One line. Zero config.
- uses: microsoft/apm-action@v1This installs the APM CLI, reads your apm.yml, and runs apm install.
- uses: microsoft/apm-action@v1
with:
compile: 'true' # generate AGENTS.md after install
apm-version: '0.7.0' # pin a specific APM version
working-directory: './my-project' # custom working directory- uses: microsoft/apm-action@v1
with:
isolated: 'true'
dependencies: |
- microsoft/apm-sample-packageInstall dependencies and pack them into a self-contained .tar.gz archive. Combine with actions/upload-artifact to share across jobs.
- uses: microsoft/apm-action@v1
id: pack
with:
pack: 'true'
target: 'copilot'
- uses: actions/upload-artifact@v4
with:
name: agent-bundle
path: ${{ steps.pack.outputs.bundle-path }}Restore primitives from a bundle — no APM installation, no Python, no network. If APM happens to be on PATH, it uses apm unpack for integrity verification; otherwise it falls back to tar xzf.
- uses: actions/download-artifact@v4
with:
name: agent-bundle
- uses: microsoft/apm-action@v1
with:
bundle: './*.tar.gz'Pack once, restore everywhere — identical primitives across all consumer jobs.
jobs:
agent-config:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: microsoft/apm-action@v1
id: pack
with:
pack: 'true'
target: 'copilot'
- uses: actions/upload-artifact@v4
with:
name: agent-bundle
path: ${{ steps.pack.outputs.bundle-path }}
lint:
needs: agent-config
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: agent-bundle
- uses: microsoft/apm-action@v1
with:
bundle: './*.tar.gz'
# .github/ is ready — primitives deployed
deploy:
needs: agent-config
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: agent-bundle
- uses: microsoft/apm-action@v1
with:
bundle: './*.tar.gz'
# Same primitives, different job. Byte-identical.| Input | Required | Default | Description |
|---|---|---|---|
working-directory |
No | . |
Working directory for execution. Must exist in non-isolated mode (with your apm.yml). In isolated, pack, or bundle modes the directory is created automatically. |
apm-version |
No | latest |
APM version to install |
script |
No | APM script to run after install | |
dependencies |
No | YAML array of extra dependencies to install (additive to apm.yml) | |
isolated |
No | false |
Ignore apm.yml and clear pre-existing primitive dirs — install only inline dependencies |
compile |
No | false |
Run apm compile after install to generate AGENTS.md |
pack |
No | false |
Pack a bundle after install (produces .tar.gz by default) |
bundle |
No | Restore from a bundle (local path or glob). Skips APM installation entirely. | |
target |
No | Bundle target: copilot, vscode, claude, or all (used with pack: true) |
|
archive |
No | true |
Produce .tar.gz instead of directory (used with pack: true) |
| Output | Description |
|---|---|
success |
Whether the action succeeded (true/false) |
primitives-path |
Path where agent primitives were deployed (.github) |
bundle-path |
Path to the packed bundle (only set in pack mode) |
This action bundles the following open-source packages (see dist/licenses.txt for full license texts):
- @actions/core — GitHub Actions toolkit (MIT)
- @actions/exec — GitHub Actions exec helpers (MIT)
- @actions/io — GitHub Actions I/O helpers (MIT)
- js-yaml — YAML parser (MIT)
See CONTRIBUTING.md for details.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.