Skip to content

fix(action): resolve arch for linux and write an expanded PATH - #309

Merged
MadsBogeskov merged 4 commits into
masterfrom
fix/action-install
Aug 4, 2026
Merged

fix(action): resolve arch for linux and write an expanded PATH#309
MadsBogeskov merged 4 commits into
masterfrom
fix/action-install

Conversation

@MadsBogeskov

@MadsBogeskov MadsBogeskov commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Two bugs in the install script, plus a simplification.

Linux was hardcoded to amd64

shuttle-linux-amd64 was downloaded unconditionally on Linux, so arm64 runners got an x86_64 binary. The release publishes shuttle-linux-arm64, so os and arch are now resolved from uname for 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 expanded PATH, making shuttle version pass locally while later steps would fail with shuttle: command not found. Now writes $HOME/bin.

Download URL

Replaced the releases/latest redirect scraping with releases/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 arm64 asset (Mach-O 64-bit executable arm64), shuttle version prints 0.25.0, and GITHUB_PATH receives 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-amd64 case 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 find shuttle on macOS.

Linux arm64: The script no longer always downloads shuttle-linux-amd64. It maps uname -m to arm64 or amd64 (and fails on unknown arch) and uname -s to darwin or linux, then fetches shuttle-$os-$arch.

Download: Release version is no longer resolved by scraping the releases/latest redirect; it uses releases/latest/download/shuttle-$os-$arch, aligned with README install snippets.

macOS PATH: GITHUB_PATH is updated with $HOME/bin instead of the literal ~/bin/, so GitHub Actions expands the entry for subsequent steps (the in-step export PATH had masked the bug for shuttle version only).

Install layout is unchanged in spirit: Darwin installs to $HOME/bin and adds it to GITHUB_PATH; Linux moves the binary to /usr/local/bin/shuttle.

Reviewed by Cursor Bugbot for commit 52a17f0. Configure here.

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
MadsBogeskov marked this pull request as ready for review July 28, 2026 11:44
@MadsBogeskov
MadsBogeskov requested a review from a team as a code owner July 28, 2026 11:44
@MadsBogeskov
MadsBogeskov enabled auto-merge (squash) July 28, 2026 11:44
Comment thread action.yml Outdated
Comment thread README.md Outdated
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.
@MadsBogeskov
MadsBogeskov requested a review from mahlunar August 4, 2026 08:20
@MadsBogeskov
MadsBogeskov merged commit 2f76c5b into master Aug 4, 2026
2 checks passed
@MadsBogeskov
MadsBogeskov deleted the fix/action-install branch August 4, 2026 08:50
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.

2 participants