Record an IG’s GitHub releases as pointers to their binary assets

Read an IG repository’s GitHub releases and write fhir-artifact-index/releases.json (ig-releases/v1): each asset’s name, size, SHA-256 digest and download URL, never its bytes. The IG site’s generated releases page lists them.

Skills it satisfies

A skill states the capability; this Tool is one way to exercise it. Each skill’s declared input and output contract follows, where it has one.

ig-binary-artefacts

Where the IG Publisher’s binary outputs go — full-ig.zip, package.tgz and its R4/R4B variants, package.db, validator packs, and the definitions, examples and expansions zips — and why a pages branch is the wrong place for them. Measure a branch with ig-binary-audit before deciding anything. Read before configuring an IG’s deploy or release step, before linking a download from a page, and before a pages branch grows past its size limit.

Source: fhir-harness/skills/fhir-ig-base/ig-binary-artefacts.md.

Also satisfied by: ig-binary-audit, ig-release.

The skill declares no I/O contract (schemas/skills/ig-binary-artefacts/{input,output}.schema.json).

Inputs and outputs

Each port names a shared type by IRI, so two Tools for one skill can be checked for interchangeability.

porttyperequireddescriptionconstraint
ininstanceFilesystemPathyesstring · A filesystem path, possibly outside the repository. Not admissible as a command-line argument.
inrepoTextowner/repo; default the instance menu’s recorded IG source, else its declaration’s repository.string · A short single-line human string. Not admissible as a command-line argument.
outreleasesFilesystemPath<instance>/fhir-artifact-index/releases.json.string · A filesystem path, possibly outside the repository. Not admissible as a command-line argument.

Processes and tasks

Steps this Tool can carry out, because each names a skill it satisfies:

processsteplanevia skill
L3 FHIR IG pipelinePublish the IG sitePublication managerig-binary-artefacts
An IG release: the owner tags, a draft is built, the owner publishesTag the IG’s current versionOwner (release authority, a person)ig-binary-artefacts
An IG release: the owner tags, a draft is built, the owner publishesBuild the tag in full and make the draft releaseIG release (GitHub runner: full build, draft release)ig-binary-artefacts
An IG release: the owner tags, a draft is built, the owner publishesPublish the draft releaseOwner (release authority, a person)ig-binary-artefacts
An IG release: the owner tags, a draft is built, the owner publishesCheck the current version’s tag and releaseRelease check (advisory)ig-binary-artefacts
An IG release: the owner tags, a draft is built, the owner publishesRun IG release (draft) by hand for the tagOwner (release authority, a person)ig-binary-artefacts

How it is deployed and reached

  • Command line. From the repository root: bun run fhir-harness/scripts/ingest-ig-releases.ts --instance <dir> [--repo owner/repo] [--from releases.json].
  • GitHub Actions. No workflow in this checkout runs its command.

As an API: its operation in the OpenAPI document and the MCP tool list of its layer.

installnone
runtimebun
networkyes

When a host it reaches is refused:

host / errorremedy
api.github.comnone: Pass --from <releases.json>, saved where GitHub is reachable.
when to choose it
whenAfter an IG repository cuts a release, so its pages list the new assets.
limitsA record of what GitHub reported on the day it was read; a later release is absent until the next run. Drafts are never recorded.
costOne GitHub API call per 100 releases.

What it is made of

Linked data

The Tool is published as its own JSON-LD document at its IRI, https://litlfred.github.io/folio-assistant/fhir-harness/tools/ingest-ig-releases.jsonld, partOf its layer’s document. The node below is the definition this page was drawn from, and is embedded in the page as application/ld+json.

{
  "@context": "https://litlfred.github.io/folio-assistant/fhir-harness/fhir-harness.context.jsonld",
  "@id": "https://litlfred.github.io/folio-assistant/fhir-harness/tools/ingest-ig-releases.jsonld",
  "@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
  "partOf": "https://litlfred.github.io/folio-assistant/fhir-harness/fhir-harness.jsonld",
  "name": "ingest-ig-releases",
  "title": "Record an IG's GitHub releases as pointers to their binary assets",
  "description": "Read an IG repository's GitHub releases and write `fhir-artifact-index/releases.json` (`ig-releases/v1`): each asset's name, size, SHA-256 digest and download URL, never its bytes. The IG site's generated `releases` page lists them.",
  "install": {
    "none": true
  },
  "invoke": {
    "shell": "bun run fhir-harness/scripts/ingest-ig-releases.ts --instance <dir> [--repo owner/repo] [--from releases.json]"
  },
  "io": {
    "inputs": [
      {
        "name": "instance",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/FilesystemPath",
        "required": true
      },
      {
        "name": "repo",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Text",
        "description": "`owner/repo`; default the instance menu's recorded IG source, else its declaration's `repository`.",
        "required": false
      }
    ],
    "outputs": [
      {
        "name": "releases",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/FilesystemPath",
        "description": "`<instance>/fhir-artifact-index/releases.json`."
      }
    ]
  },
  "satisfies": [
    "ig-binary-artefacts"
  ],
  "requirements": {
    "runtime": [
      "bun"
    ],
    "network": true
  },
  "remedies": [
    {
      "host": "api.github.com",
      "none": "Pass `--from <releases.json>`, saved where GitHub is reachable."
    }
  ],
  "selection": {
    "when": "After an IG repository cuts a release, so its pages list the new assets.",
    "limits": "A record of what GitHub reported on the day it was read; a later release is absent until the next run. Drafts are never recorded.",
    "cost": "One GitHub API call per 100 releases."
  }
}

folio-assistant — code under the Apache License 2.0, documentation under CC BY 3.0. Generated schema and API references are rebuilt from source on every push to main.

deployed dev