Skip to content

fix: download release assets without gh CLI - #7

Closed
zheli wants to merge 2 commits into
mainfrom
fix-oci-download-no-gh-cli
Closed

fix: download release assets without gh CLI#7
zheli wants to merge 2 commits into
mainfrom
fix-oci-download-no-gh-cli

Conversation

@zheli

@zheli zheli commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Problem

The first test run of publish-oci.yml failed at Download release assets:

gh: command not found  (exit code 127)

The self-hosted e2e runner (github-runner-2-e2e) is minimal and has no
GitHub CLI installed, so gh release download can't run there.

Fix

Since homebrew-canton-devkit is public, release assets are anonymously
downloadable. Replace the gh call with direct curl downloads of the
deterministic release-download URLs — no gh, no token, no jq needed.

Additional adjustments:

  • Checksum verify is scoped to the three archives we actually download.
    SHA256SUMS also lists the .deb (which we don't fetch), so a full
    sha256sum --check SHA256SUMS would fail on the missing file.
  • unzip fail-fast guard added before extracting the Windows .zip, so a
    missing unzip on the runner produces a clear error.

Verification

Validated locally against the v0.10.1 release:

  • all three archives download via curl,
  • checksums verify OK,
  • the Windows binary extracts from the zip.

YAML lint passes.

Runner note: the failed run confirmed the e2e runner is reachable from this
public repo and GITHUB_TOKEN already has Packages: write, so the GHCR
publish path is good once the download step is fixed.

Follow-up

  • Ensure unzip is installed on the e2e runner.
  • After a successful publish, set the GHCR package visibility to Public.

zheli added 2 commits June 27, 2026 22:42
The self-hosted e2e runner has no GitHub CLI installed, so the
'gh release download' step failed with 'gh: command not found' (exit
127). Since this repo is public, release assets are anonymously
downloadable — replace the gh call with direct curl downloads of the
deterministic release-download URLs (no gh, no token, no jq).

Also:
- Scope checksum verification to the three archives we actually fetch
  (SHA256SUMS lists the .deb too, which we don't download, so a full
  --check would fail on the missing file).
- Add an unzip fail-fast guard before extracting the Windows .zip, since
  the minimal runner may lack it.

Verified locally against the v0.10.1 release: all downloads succeed,
checksums verify, and the Windows binary extracts.
The previous test run got past download + checksum verify but failed at
'Lay out per-platform component dirs' with:

  tar: canton-devkit: Not found in archive

The tarball members are prefixed with './' (./canton-devkit, ./LICENSE)
while the zip members are not (canton-devkit.exe, LICENSE), so naming
individual members in tar/unzip is fragile and broke for the tarballs.

Extract the whole archive into a scratch dir and relocate files by
basename instead. Verified locally against all three v0.10.1 archives:
binary + LICENSE land correctly and the per-platform component.yaml is
templated with the right binary path.
@zheli

zheli commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Closing unmerged. We're going with Option A (publish from the canton-devkit repo). The publish workflow this PR fixed is being removed in #8, so this download fix is no longer needed.

@zheli zheli closed this Jun 28, 2026
@zheli
zheli deleted the fix-oci-download-no-gh-cli branch August 6, 2026 07:08
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.

1 participant