From 0f53b0fa26b60fe1de1f620764ffc85ffd517c47 Mon Sep 17 00:00:00 2001 From: Nando Vieira Date: Thu, 4 Jun 2026 13:57:36 -0700 Subject: [PATCH 1/3] Publish Docker Hub overview on each release. --- .github/workflows/publish.yml | 34 ++++++++++++ README.md | 1 + docker/README.md | 99 +++++++++++++++++++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 docker/README.md diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 46cb2b3..2e93cb2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -223,6 +223,39 @@ jobs: --stellar-cli-version "$STELLAR_CLI_VERSION" \ --registry "$REGISTRY" + description: + name: update Docker Hub description + needs: [manifest] + # Skip for forks publishing to a non-Docker-Hub registry; the Docker Hub + # API only makes sense for docker.io repositories. + if: startsWith(vars.REGISTRY || 'docker.io/stellar/stellar-cli', 'docker.io/') + runs-on: ubuntu-24.04 + steps: + - name: checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: update full description from docker/README.md + env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + run: | + # Derive the Docker Hub "namespace/repo" path from REGISTRY by + # dropping the docker.io/ host prefix. + repo="${REGISTRY#docker.io/}" + + token=$(jq -n --arg u "$DOCKERHUB_USERNAME" --arg p "$DOCKERHUB_TOKEN" \ + '{username: $u, password: $p}' | \ + curl -sf -X POST "https://hub.docker.com/v2/users/login/" \ + -H "Content-Type: application/json" \ + -d @- \ + | jq -r .token) + + jq -n --arg desc "$(cat ./docker/README.md)" '{"full_description": $desc}' | \ + curl -sf -X PATCH "https://hub.docker.com/v2/repositories/${repo}/" \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer ${token}" \ + -d @- \ + > /dev/null + release: name: enrich github release with sbom and provenance needs: [matrix, aliases] @@ -267,6 +300,7 @@ jobs: - build - manifest - aliases + - description - release runs-on: ubuntu-24.04 steps: diff --git a/README.md b/README.md index 2203347..b29c5b4 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ compare the resulting WASM sha256. | `Dockerfile` | Two-stage builder + runtime, args-driven. | | `builds.json` | Source of truth for which (stellar-cli, rust base key) pairs we publish. | | `builds.schema.json` | JSON Schema for `builds.json`. | +| `docker/README.md` | Docker Hub overview. The publish workflow pushes this to the repository's `full_description` on each release. | | `scripts/build_image.py` | Local single-image build. | | `scripts/validate_json.py` | Validates every `*.json` for sorted keys and `builds.json` against the schema. | | `scripts/refresh.py` | For one `--stellar-cli-version`: picks the rust base labels, resolves the upstream cli ref and each base's index digest, and appends the fully-qualified pins `