Skip to content

Publish a catalog

nem author publish packs a catalog directory into a single tagged OCI image index and pushes it to a registry. The index references each package’s manifest, which is also pushed to the registry.

nem author publish ghcr.io/org/nem-catalog --tag v1               # publish ./
nem author publish ghcr.io/org/nem-catalog ./catalog --tag v1     # explicit dir

The catalog directory defaults to the current directory. At least one --tag is required (unless --dry-run), and --tag is repeatable:

nem author publish ghcr.io/org/nem-catalog --tag v1 --tag latest

What happens

  1. Every pkgs/<name>/pkg.yaml is parsed and linted offline. Lint findings abort the publish unless you pass --force. A package’s name must match its pkgs/<dir> directory name.
  2. Each pkg.yaml is pushed as an OCI artifact — an image manifest with the custom artifact type application/vnd.nem.pkg.v1+yaml, whose single layer is the raw manifest, byte for byte.
  3. An OCI image index referencing every package artifact is assembled (with a catalog schemaVersion annotation), pushed to the registry base, and tagged with each --tag.

Dry run

Use --dry-run to assemble and report the index without pushing — no --tag required:

nem author publish ghcr.io/org/nem-catalog --dry-run

Consuming it

Consumers add the published catalog like any other OCI source:

nem catalog add oci org ghcr.io/org/nem-catalog:v1

See Working with catalogs for the consumer side.