Conversation
There was a problem hiding this comment.
Pull request overview
Adds a release-time publish pipeline to build and push per-arch images to Docker Hub, assemble per-(cli,rust) multi-arch manifest lists, and then publish moving aliases (:<cli>, :latest). It also extends the build matrix generator so the workflow doesn’t need to re-derive base-image digests or upstream refs during CI.
Changes:
- Extend
scripts/resolve-matrix.shmatrix rows to includestellar_cli_refandrust_image_digest. - Add
.github/workflows/publish.ymlto build/push per-arch images on tag release, then create manifest lists and update aliases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| scripts/resolve-matrix.sh | Adds stellar_cli_ref and rust_image_digest fields to each matrix include row for publish-time consumption. |
| .github/workflows/publish.yml | New workflow to publish per-arch images, assemble multi-arch manifests, and move :<cli> / :latest tags on releases. |
Comments suppressed due to low confidence (2)
.github/workflows/publish.yml:103
- The manifest job uses
docker buildx imagetools inspect/createbut never sets up Buildx (unlike the build job). Adddocker/setup-buildx-action(and, if needed, a builder selection) in this job to avoid reliance on whatever Buildx happens to be preinstalled on the runner.
manifest:
name: assemble manifest lists
needs: build
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: login to Docker Hub
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: create manifest list per (cli, rust) pair
run: |
.github/workflows/publish.yml:146
- The aliases job also uses
docker buildx imagetools createwithout setting up Buildx. Adddocker/setup-buildx-actionin this job as well so alias publishing doesn’t depend on implicit runner state.
aliases:
name: publish moving aliases
needs: manifest
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: login to Docker Hub
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: publish :<cli> and :latest aliases
run: |
newest_cli="$(./scripts/newest-pair.sh --stellar-cli-version)"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the release publish workflow that pushes per-arch images to
docker.io/stellar/stellar-cli, assembles per-pair multi-arch manifest lists, and moves the:<cli>and:latestaliases. Driven entirely by GitHub Actions native steps (docker/build-push-action,docker buildx imagetools create) — no bespoke shell wrappers, since publishing is a CI-only operation that can never run usefully on a developer's laptop.Also extends
scripts/resolve-matrix.shso each matrix row carries the inputs the publish job needs (stellar_cli_ref,rust_image_digest) instead of re-queryingbuilds.jsoninside the workflow.Why
Without this, the repo has scripts and a smoke build but no path from "merge to main" or "tag a release" to "image lives on Docker Hub". This is the actual production-publish flow.
Notable choices
docker/build-push-actionover bespoke shell. The script-based layer that's load-bearing elsewhere in this repo (locally-runnable, testable on a laptop) earns nothing here — pushing todocker.io/stellar/stellar-clineedsDOCKERHUB_TOKENand the runner's OIDC environment. The native action also sets up cleanly for the next PR's SLSA + SBOM (provenance:andsbom:flags). Alluses:are SHA-pinned to the latest releases.ubuntu-24.04, arm64 onubuntu-24.04-arm. No QEMU, no cross-compilation; each platform builds on its actual hardware.forceflag. Per-arch tags (:26.0.0-rust1.94.0-amd64) and per-pair multi-arch lists (:26.0.0-rust1.94.0) are content-stable in this repo's model. A pre-pushdocker buildx imagetools inspectaborts the job if the target tag already exists. There is no workflow input to override. If a publish needs to be genuinely redone (corrupt push, etc.), the manual remedy is to delete the offending tag in Docker Hub by hand and re-run — that's a deliberate human choice, not a workflow toggle.success()semantics onneeds: buildmeans a single per-arch failure skips manifest assembly and aliases entirely. Verifiers can still cite the succeeded per-arch digest; the manifest list and:latestsimply don't move for that release.Re-run failed jobsis the path. It re-runs only failed jobs, so the existence check never fires on a job that already succeeded. A whole-workflow rerun is intentionally noisy — it fails loudly on tags it already pushed.:<cli>,:latest) and are exempt from the existence check — each release re-points them at the new manifest list.workflow_dispatch(for manual reruns and ad-hoc publishes) + push ofv*tags. Push tomainis NOT a publish trigger.Out of scope
SLSA provenance attestation and SBOM generation — those are the next PR and slot in naturally as
provenance:+sbom:flags on the existingdocker/build-push-actionstep plus a release page that attaches the artifacts.Depends on
#2 (
matrix) — this branch is based on it. Base will auto-update tomainonce #2 merges.Verification
./scripts/resolve-matrix.sh --prettynow includesstellar_cli_refandrust_image_digestper row;./scripts/validate-json.shstill passes.workflow_dispatchfrom the Actions UI against a tag once this PR merges.