Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
787f4a5
Sort stellar_cli_versions by version after every change.
fnando May 29, 2026
ba1121b
Bootstrap Python project layout with uv and pytest.
fnando May 29, 2026
5a2c80b
Add lib/semver for numeric version sorting.
fnando May 29, 2026
0addb9b
Add lib/rust_keys for composite base key parsing.
fnando May 29, 2026
41abb57
Add lib/builds for builds.json read, write, and lookups.
fnando May 29, 2026
d8711d5
Add lib/common for logging and preflight checks.
fnando May 29, 2026
6a80137
Add lib/runner for subprocess and HTTP wrappers.
fnando May 29, 2026
6b41e11
Migrate tag-names script to Python.
fnando May 29, 2026
9a7fc96
Migrate newest-pair script to Python.
fnando May 29, 2026
ab8a958
Migrate resolve-matrix script to Python.
fnando May 29, 2026
01fe981
Migrate validate-json script to Python.
fnando May 29, 2026
8f26958
Add lib/docker_inspect adapter.
fnando May 29, 2026
d85f1e6
Migrate build-image script to Python.
fnando May 29, 2026
bba20f0
Migrate smoke-test-image script to Python.
fnando May 29, 2026
45fc6e0
Migrate repro-test script to Python.
fnando May 29, 2026
9fc24ed
Tighten repro-test formatting.
fnando May 29, 2026
c6ddc07
Add lib/git_remote adapter.
fnando May 29, 2026
5eb1933
Migrate refresh-rust-digests script to Python.
fnando May 29, 2026
411325f
Migrate refresh-stellar-cli-digests to Python.
fnando May 29, 2026
3a48d18
Add lib/gh_cli adapter.
fnando May 29, 2026
4567c26
Migrate release-body script to Python.
fnando May 29, 2026
7c44a66
Migrate release-prepare script to Python.
fnando May 29, 2026
f2a8cd4
Catch missed release-prepare reference in docs.
fnando May 29, 2026
4ab99f8
Migrate release-push-branch script to Python.
fnando May 29, 2026
f994803
Migrate verify-image script to Python.
fnando May 29, 2026
84cb4a9
Lift manifest creation into a Python script.
fnando May 29, 2026
9518a71
Lift alias publishing into a Python script.
fnando May 29, 2026
45c3823
Lift release PR body composition into a Python script.
fnando May 29, 2026
2bb2d34
Drop bash remnants and shellcheck CI job.
fnando May 29, 2026
778a1e4
Avoid broken-pipe panic in build-time version check.
fnando May 29, 2026
bd74461
Fix double-backslash in cosign verify example.
fnando May 29, 2026
84f5c4a
Drop comments referencing the deleted bash scripts.
fnando May 29, 2026
4d93c93
Drop jq dependency by lifting metadata writes to Python.
fnando May 29, 2026
fd7d85a
Pin pytest below 8.4 to avoid pygments license alert.
fnando May 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: resolve newest pair
id: pair
run: |
cli="$(./scripts/newest-pair.sh --stellar-cli-version)"
rust="$(./scripts/newest-pair.sh --rust-version)"
tag="$(./scripts/tag-names.sh \
cli="$(./scripts/newest_pair.py --stellar-cli-version)"
rust="$(./scripts/newest_pair.py --rust-version)"
tag="$(./scripts/tag_names.py \
--stellar-cli-version "$cli" --rust-version "$rust")"
{
echo "cli=$cli"
Expand All @@ -35,18 +39,18 @@ jobs:
} >> "$GITHUB_OUTPUT"
- name: build image
run: |
./scripts/build-image.sh \
./scripts/build_image.py \
--stellar-cli-version "${{ steps.pair.outputs.cli }}" \
--rust-version "${{ steps.pair.outputs.rust }}"
- name: smoke test
run: |
./scripts/smoke-test-image.sh \
./scripts/smoke_test_image.py \
--image "${{ steps.pair.outputs.image }}" \
--stellar-cli-version "${{ steps.pair.outputs.cli }}" \
--rust-version "${{ steps.pair.outputs.rust }}"
- name: wasm reproducibility
run: |
./scripts/repro-test.sh \
./scripts/repro_test.py \
--image "${{ steps.pair.outputs.image }}"

complete:
Expand Down
51 changes: 32 additions & 19 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: install check-jsonschema
run: pipx install check-jsonschema
- name: install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: validate JSON files
run: ./scripts/validate-json.sh
run: ./scripts/validate_json.py

dockerfile:
name: hadolint
Expand All @@ -34,44 +36,55 @@ jobs:
dockerfile: Dockerfile
config: .hadolint.yaml

shellcheck:
name: shellcheck
python:
name: ruff
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: shellcheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0
- name: install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
scandir: scripts
severity: style
enable-cache: true
- name: ruff check
run: uv run ruff check scripts/ tests/
- name: ruff format
run: uv run ruff format --check scripts/ tests/

shell:
name: validate shell
matrix-smoke:
name: resolve-matrix smoke
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: validate shell scripts
run: ./scripts/validate-shell.sh
- name: install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: resolve and validate matrix
run: ./scripts/resolve_matrix.py >/dev/null

matrix-smoke:
name: resolve-matrix smoke
tests:
name: pytest
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: resolve and validate matrix
run: ./scripts/resolve-matrix.sh | jq -e '.include | length > 0' >/dev/null
- name: install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: run pytest
run: uv run pytest

complete:
if: always()
needs:
- json
- dockerfile
- shellcheck
- shell
- python
- matrix-smoke
- tests
runs-on: ubuntu-24.04
steps:
- name: check upstream jobs
Expand Down
147 changes: 51 additions & 96 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: install check-jsonschema
run: pipx install check-jsonschema
- name: install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: validate builds.json
run: ./scripts/validate-json.sh
run: ./scripts/validate_json.py
- name: scope to one cli version
id: scope
env:
Expand All @@ -49,7 +51,7 @@ jobs:
env:
STELLAR_CLI_VERSION: ${{ steps.scope.outputs.version }}
run: |
matrix="$(./scripts/resolve-matrix.sh \
matrix="$(./scripts/resolve_matrix.py \
--stellar-cli-version "$STELLAR_CLI_VERSION")"
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"

Expand All @@ -67,10 +69,15 @@ jobs:
- name: set up buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0

- name: install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true

- name: resolve tag
id: tag
run: |
tag="$(./scripts/tag-names.sh \
tag="$(./scripts/tag_names.py \
--stellar-cli-version ${{ matrix.stellar_cli_version }} \
--rust-version ${{ matrix.rust_base_key }} \
--platform ${{ matrix.platform }} \
Expand Down Expand Up @@ -162,17 +169,15 @@ jobs:
- name: write per-arch metadata
if: steps.skip.outputs.skipped != 'true'
run: |
out="meta-${{ matrix.stellar_cli_version }}-rust${{ matrix.rust_base_key }}-${{ matrix.arch }}.json"
jq -n \
--arg arch "${{ matrix.arch }}" \
--arg cli "${{ matrix.stellar_cli_version }}" \
--arg digest "${{ steps.build.outputs.digest }}" \
--arg image "${{ steps.tag.outputs.image }}" \
--arg rust_base_key "${{ matrix.rust_base_key }}" \
--arg rust_version "${{ matrix.rust_version }}" \
--arg tag "${{ steps.tag.outputs.tag }}" \
'{arch: $arch, digest: $digest, image: $image, rust_base_key: $rust_base_key, rust_version: $rust_version, stellar_cli_version: $cli, tag: $tag}' \
> "$out"
./scripts/write_metadata.py \
--output "meta-${{ matrix.stellar_cli_version }}-rust${{ matrix.rust_base_key }}-${{ matrix.arch }}.json" \
--arch "${{ matrix.arch }}" \
--stellar-cli-version "${{ matrix.stellar_cli_version }}" \
--digest "${{ steps.build.outputs.digest }}" \
--image "${{ steps.tag.outputs.image }}" \
--rust-base-key "${{ matrix.rust_base_key }}" \
--rust-version "${{ matrix.rust_version }}" \
--tag "${{ steps.tag.outputs.tag }}"

- name: rename provenance bundle
if: steps.skip.outputs.skipped != 'true'
Expand All @@ -182,31 +187,21 @@ jobs:

# Skipped pairs still need metadata so the release-body composer can
# show the full state of every declared pair, not just the freshly
# built ones. Queries the existing tag's manifest digest from the
# registry and writes the same meta-*.json shape we'd write on a
# fresh build (just without the SBOM/provenance files — those stay
# attached to the previously-published image's attestation store).
# built ones. Omitting --digest tells write_metadata to resolve it
# from the existing tag in the registry; the SBOM/provenance files
# are not regenerated (they stay attached to the previously-
# published image's attestation store).
- name: write per-arch metadata (skipped pair)
if: steps.skip.outputs.skipped == 'true'
run: |
# `--format '{{.Manifest.Digest}}'` behaves inconsistently across
# the amd64 and arm64 runner images (one prints the digest, the
# other prints the full verbose dump), so we just parse the
# verbose output's "Digest:" line, which is identical on both.
existing_digest="$(docker buildx imagetools inspect \
"${{ steps.tag.outputs.image }}" \
| awk '/^Digest:/ {print $2; exit}')"
out="meta-${{ matrix.stellar_cli_version }}-rust${{ matrix.rust_base_key }}-${{ matrix.arch }}.json"
jq -n \
--arg arch "${{ matrix.arch }}" \
--arg cli "${{ matrix.stellar_cli_version }}" \
--arg digest "$existing_digest" \
--arg image "${{ steps.tag.outputs.image }}" \
--arg rust_base_key "${{ matrix.rust_base_key }}" \
--arg rust_version "${{ matrix.rust_version }}" \
--arg tag "${{ steps.tag.outputs.tag }}" \
'{arch: $arch, digest: $digest, image: $image, rust_base_key: $rust_base_key, rust_version: $rust_version, stellar_cli_version: $cli, tag: $tag}' \
> "$out"
./scripts/write_metadata.py \
--output "meta-${{ matrix.stellar_cli_version }}-rust${{ matrix.rust_base_key }}-${{ matrix.arch }}.json" \
--arch "${{ matrix.arch }}" \
--stellar-cli-version "${{ matrix.stellar_cli_version }}" \
--image "${{ steps.tag.outputs.image }}" \
--rust-base-key "${{ matrix.rust_base_key }}" \
--rust-version "${{ matrix.rust_version }}" \
--tag "${{ steps.tag.outputs.tag }}"

- name: upload release artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand All @@ -232,50 +227,20 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: set up buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- 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 base) pair
run: |
stellar_cli_ref="$(jq -r --arg v "$STELLAR_CLI_VERSION" \
'.stellar_cli_versions[] | select(.version == $v) | .ref' builds.json \
| head -n1)"
test -n "$stellar_cli_ref" \
|| { echo "::error::no stellar_cli_versions entry for $STELLAR_CLI_VERSION"; exit 1; }
while IFS= read -r key; do
list_tag="$(./scripts/tag-names.sh \
--stellar-cli-version "$STELLAR_CLI_VERSION" --rust-version "$key" \
--stellar-cli-ref "$stellar_cli_ref")"
amd64_tag="$(./scripts/tag-names.sh \
--stellar-cli-version "$STELLAR_CLI_VERSION" --rust-version "$key" \
--platform linux/amd64 \
--stellar-cli-ref "$stellar_cli_ref")"
arm64_tag="$(./scripts/tag-names.sh \
--stellar-cli-version "$STELLAR_CLI_VERSION" --rust-version "$key" \
--platform linux/arm64 \
--stellar-cli-ref "$stellar_cli_ref")"
if docker buildx imagetools inspect "$REGISTRY:$list_tag" >/dev/null 2>&1; then
echo "::warning::manifest list $REGISTRY:$list_tag already exists; skipping (lists are immutable)"
{
echo "## ⚠️ Manifest list skipped — already published"
echo ""
echo "\`$REGISTRY:$list_tag\` was already in the registry."
} >> "$GITHUB_STEP_SUMMARY"
continue
fi
echo "::group::manifest $REGISTRY:$list_tag"
docker buildx imagetools create \
--tag "$REGISTRY:$list_tag" \
"$REGISTRY:$amd64_tag" \
"$REGISTRY:$arm64_tag"
echo "::endgroup::"
done < <(jq -r --arg v "$STELLAR_CLI_VERSION" '
.stellar_cli_versions[]
| select(.version == $v)
| .rust_versions[]
' builds.json)
./scripts/publish_manifests.py \
--stellar-cli-version "$STELLAR_CLI_VERSION" \
--registry "$REGISTRY"

aliases:
name: publish moving aliases
Expand All @@ -288,34 +253,20 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: set up buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- 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: |
source scripts/lib/common.sh
default_rust="$(derive_default_rust_for_cli "$STELLAR_CLI_VERSION")"
stellar_cli_ref="$(stellar_cli_ref_for "$STELLAR_CLI_VERSION")"
target_tag="$(./scripts/tag-names.sh \
./scripts/publish_aliases.py \
--stellar-cli-version "$STELLAR_CLI_VERSION" \
--rust-version "$default_rust" \
--stellar-cli-ref "$stellar_cli_ref")"
target="$REGISTRY:$target_tag"

echo "::group::alias $REGISTRY:$STELLAR_CLI_VERSION -> $target"
docker buildx imagetools create --tag "$REGISTRY:$STELLAR_CLI_VERSION" "$target"
echo "::endgroup::"

newest_cli="$(./scripts/newest-pair.sh --stellar-cli-version)"
if [ "$STELLAR_CLI_VERSION" = "$newest_cli" ]; then
echo "::group::alias $REGISTRY:latest -> $target"
docker buildx imagetools create --tag "$REGISTRY:latest" "$target"
echo "::endgroup::"
else
echo "cli $STELLAR_CLI_VERSION is not the newest ($newest_cli); skipping :latest"
fi
--registry "$REGISTRY"

release:
name: enrich github release with sbom and provenance
Expand All @@ -326,6 +277,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: download per-arch release artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
Expand All @@ -334,7 +289,7 @@ jobs:
merge-multiple: true
- name: compose structural body section
run: |
./scripts/release-body.sh \
./scripts/release_body.py \
--stellar-cli-version "$STELLAR_CLI_VERSION" \
--metadata-dir release-artifacts \
--registry "$REGISTRY" \
Expand Down
Loading
Loading