Skip to content

Add the stage facade and run test-staging through it - #9

Open
alexadereyko wants to merge 1 commit into
jira/TBBAS-3295-staging-pullfrom
jira/TBBAS-3297-stage-facade
Open

Add the stage facade and run test-staging through it#9
alexadereyko wants to merge 1 commit into
jira/TBBAS-3295-staging-pullfrom
jira/TBBAS-3297-stage-facade

Conversation

@alexadereyko

@alexadereyko alexadereyko commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Depends on:

Brief

Add stage, a reusable workflow that composes the three primitives — staging-pull, reusable, staging-push — into one publish flow, so a project builds and publishes its staging in a single call.

Description

stage runs three steps: pull dependencies from ghcr (optional) → build / stage / test (reusable) → publish to ghcr (optional). Each side is gated by an empty input: no staging-pull means no pull, no staging-push means no push (the build's staging just stays a run artifact).

The inputs are a pass-through to the primitives:

  • staging-pull — the deps array for staging-pull (empty → no pull).
  • include-jobs, cmake-presets, cpack-presets, packages, upload-pattern, timeout — passed straight to reusable.
  • staging-push — the stagings array for staging-push (empty → no push).

Usage example

A module that depends on core is two stage calls — core builds and publishes itself, then the module pulls it back from ghcr and builds against it:

jobs:
  core:
    permissions: { contents: read, packages: write }
    uses: ./.github/workflows/stage.yml
    with:
      include-jobs:   '[ ... ]'
      cmake-presets:  '[ ... ]'
      cpack-presets:  '[ ... ]'
      staging-push:   '[ { "path": "ghcr.io/<org>/.../core", "artifacts": ["core-staging-*"] } ]'

  module:
    needs: core
    permissions: { contents: read, packages: write }
    uses: ./.github/workflows/stage.yml
    with:
      staging-pull:   '[ { "artifact": "dep-core-<job>", "packages": [ ... ] } ]'
      cmake-presets:  '[ ... ]'
      packages:       '[ { "artifacts": [ { "name": "dep-core-<job>", "dir": "staging-deps" } ] } ]'
      staging-push:   '[ { "path": "ghcr.io/<org>/.../module", "artifacts": ["module-staging-*"] } ]'

stage composes the primitives into one publish flow -- staging-pull (optional)
-> reusable -> staging-push (optional) -- each side gated by an empty input.
A repo builds itself; a flat facade over the primitives, never another facade.

test-staging now drives the whole chain as two stage calls: core builds and
publishes hello-core, module (needs core) pulls it back from ghcr and builds
hello-module against it, then publishes the module.
@alexadereyko
alexadereyko force-pushed the jira/TBBAS-3297-stage-facade branch from 6b9b93d to 3d392c2 Compare July 23, 2026 16:29
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