fix(action): resolve arch for linux and write an expanded PATH - #309
Merged
Conversation
The install script hardcoded amd64 on Linux, so it downloaded an x86_64 binary on arm64 runners. Resolve os and arch from uname for both platforms instead. The macOS branch appended a literal '~/bin/' to GITHUB_PATH. GitHub reads that file verbatim without shell expansion, so the entry did not resolve and shuttle was unavailable in later steps. Write $HOME/bin instead. Also download from releases/latest/download directly rather than scraping the version out of the releases/latest redirect.
Release asset downloads occasionally fail transiently and failed the whole step. Retry with a delay, using curl's own retry flags rather than a shell loop.
Callers previously needed a separate step to run shuttle prepare after installing. Setting the lifecycle input now prepares the plan and exposes its SHA as the shuttle_plan_sha output. The input is optional so installing without preparing keeps working, which matters because prepare needs a checked out repository with a shuttle.yaml file.
MadsBogeskov
marked this pull request as ready for review
July 28, 2026 11:44
MadsBogeskov
enabled auto-merge (squash)
July 28, 2026 11:44
mahlunar
requested changes
Jul 28, 2026
The lifecycle/prepare concept is specific to a private shuttle plan setup and doesn't exist in shuttle itself, per review feedback on #309. Keep the uses:/yaml fence fix from the same commit.
mahlunar
approved these changes
Aug 4, 2026
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.
Two bugs in the install script, plus a simplification.
Linux was hardcoded to amd64
shuttle-linux-amd64was downloaded unconditionally on Linux, so arm64 runners got an x86_64 binary. The release publishesshuttle-linux-arm64, soosandarchare now resolved fromunamefor both platforms, with an explicit failure on anything unsupported.GITHUB_PATH got a literal tilde
The macOS branch did
echo "~/bin/" >> $GITHUB_PATH. GitHub reads that file verbatim without shell expansion, so the resulting PATH entry never resolved to a real directory. It went unnoticed because the same step also exported an expandedPATH, makingshuttle versionpass locally while later steps would fail withshuttle: command not found. Now writes$HOME/bin.Download URL
Replaced the
releases/latestredirect scraping withreleases/latest/download/…, which resolves to the asset directly. Same change as was made to the README install snippets in #308.Testing
Ran the resulting script on darwin/arm64: it downloads the
arm64asset (Mach-O 64-bit executable arm64),shuttle versionprints0.25.0, andGITHUB_PATHreceives a fully expanded path.Note
There is a similar install snippet in a "Shuttle prepare" composite action in another repo that has the same hardcoded
Linux-*) shuttle-linux-amd64case and the same redirect scraping. It is outside this repo so it is not covered here.Note
Low Risk
Low-risk CI install script fixes with no application runtime, auth, or data-handling changes; main risk is mis-detection on exotic runners, which now fails explicitly.
Overview
Install Shuttle composite action (
action.yml) is refactored so Linux runners get the right CPU binary and later workflow steps can findshuttleon macOS.Linux arm64: The script no longer always downloads
shuttle-linux-amd64. It mapsuname -mtoarm64oramd64(and fails on unknown arch) anduname -stodarwinorlinux, then fetchesshuttle-$os-$arch.Download: Release version is no longer resolved by scraping the
releases/latestredirect; it usesreleases/latest/download/shuttle-$os-$arch, aligned with README install snippets.macOS PATH:
GITHUB_PATHis updated with$HOME/bininstead of the literal~/bin/, so GitHub Actions expands the entry for subsequent steps (the in-stepexport PATHhad masked the bug forshuttle versiononly).Install layout is unchanged in spirit: Darwin installs to
$HOME/binand adds it toGITHUB_PATH; Linux moves the binary to/usr/local/bin/shuttle.Reviewed by Cursor Bugbot for commit 52a17f0. Configure here.