Skip to content

Add staging-pull and pull the core through ghcr in the test - #8

Open
alexadereyko wants to merge 2 commits into
jira/TBBAS-3292-staging-pushfrom
jira/TBBAS-3295-staging-pull
Open

Add staging-pull and pull the core through ghcr in the test#8
alexadereyko wants to merge 2 commits into
jira/TBBAS-3292-staging-pushfrom
jira/TBBAS-3295-staging-pull

Conversation

@alexadereyko

@alexadereyko alexadereyko commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Depends on:

Brief

Add staging-pull, a reusable workflow that resolves requested staging packages in an OCI registry (ghcr) to digests, pulls them as tarballs, and uploads them as an artifact.

Description

The input is a list of artifacts to produce, each with this structure:

deps: >-
  [
    {
      "artifact": "dep-core-ubuntu-22.04-x86_64-ninja-gcc-release",
      "packages": [
        {
          "path": "ghcr.io/opendaq/test/staging/hello-core",
          "tag": "<sha>",
          "annotations": {
            "org.opencontainers.image.title": "*-x86_64-linux-gcc-11-release.tar.gz"
          }
        }
      ]
    }
  ]
  • artifact — the name of the artifact to upload.
  • packages — the packages the artifact is assembled from; each is resolved against its index and every matching child is pulled into it.
  • path / tag — the package path (its OCI index) and the tag that picks a specific index.
  • annotations — how the child is resolved. In the general case a child is picked by its org.opencontainers.image.title (the file name). All values are globs, so you match on exactly the fields you care about — pin the compiler where it's deterministic, leave it open where the runner owns it (*-macos-apple-clang-*). For a more precise resolve, use com.opendaq.* annotations (present when the staging carried a staging-meta.json).

The workflow fetches the index at path:tag and matches each child's descriptor annotations against the globs in a single request — no per-child manifest fetch. A request with no match is "not found" and fails; every match is pulled by digest — more than one is fine — but two pulled artifacts may not share a file name, since they'd clobber each other in the artifact, which fails loudly. The pulled tarballs and a manifest.json (what was resolved: path, tag, digest, title, annotations) go into the artifact, so the build can pin by digest. One matrix job per entry uploads one artifact.

@alexadereyko
alexadereyko force-pushed the jira/TBBAS-3295-staging-pull branch from 828cfd0 to 0fe81ba Compare July 20, 2026 14:40
@alexadereyko alexadereyko self-assigned this Jul 20, 2026
@alexadereyko
alexadereyko force-pushed the jira/TBBAS-3295-staging-pull branch 2 times, most recently from 3252c7c to 0eed434 Compare July 21, 2026 14:05
@alexadereyko
alexadereyko requested a review from JakaMohorko July 21, 2026 14:05
@alexadereyko
alexadereyko force-pushed the jira/TBBAS-3292-staging-push branch from bf3412e to e483851 Compare July 22, 2026 12:48
staging-pull fetches a package's manifest and resolves its children by
descriptor annotations, globs included, then pulls the matches as tarballs
into a deps artifact. A file-name collision between two pulled artifacts is
an error.
@alexadereyko
alexadereyko force-pushed the jira/TBBAS-3295-staging-pull branch from 0eed434 to aa642e2 Compare July 22, 2026 13:02
Public packages pull anonymously and a fork PR only has a read-only
token, so warn and continue instead of failing the pull when login
does not succeed. run() gains a fatal flag; fetch and pull stay fatal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants