From 580172ecf96592313bf857c40857901e517810f8 Mon Sep 17 00:00:00 2001 From: Steven Roomberg Date: Wed, 3 Jun 2026 16:15:39 -0400 Subject: [PATCH] Install just via curl instead of extractions/setup-just Replaces the unverified third-party extractions/setup-just action with a run step that downloads the prebuilt just binary from its GitHub release. This repo is public and cannot consume the private EasyPost/ep-actions composite action, and there is no verified-publisher action for just. Resolves the latest release tag via the github.com redirect (avoids api.github.com rate limits on shared runner IPs), downloads the correct asset per RUNNER_OS (Linux/macOS/Windows), extracts into $RUNNER_TEMP, and adds it to $GITHUB_PATH so later steps in any shell can find it. --- .github/workflows/ci.yml | 66 +++++++++++++++++++++++++++++++++-- .github/workflows/release.yml | 22 +++++++++++- 2 files changed, 84 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d422ff..1be6fa2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,27 @@ jobs: rubyversion: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4', '4.0'] steps: - uses: actions/checkout@v6 - - uses: extractions/setup-just@v3 + - name: Install just + shell: bash + run: | + set -euo pipefail + install_dir="${RUNNER_TEMP:-/tmp}/just-bin" + mkdir -p "$install_dir" + # Resolve the latest release tag via the github.com redirect to avoid + # api.github.com rate limits on shared runner egress IPs. + latest_url=$(curl -fsSLI -o /dev/null -w '%{url_effective}' https://github.com/casey/just/releases/latest) + just_version="${latest_url##*/tag/}" + case "$RUNNER_OS" in + Windows) asset="just-${just_version}-x86_64-pc-windows-msvc.zip" ;; + macOS) asset="just-${just_version}-x86_64-apple-darwin.tar.gz" ;; + *) asset="just-${just_version}-x86_64-unknown-linux-musl.tar.gz" ;; + esac + curl -fL "https://github.com/casey/just/releases/download/${just_version}/${asset}" -o "$install_dir/$asset" + case "$asset" in + *.zip) unzip -o "$install_dir/$asset" -d "$install_dir" ;; + *) tar -xzf "$install_dir/$asset" -C "$install_dir" ;; + esac + echo "$install_dir" >> "$GITHUB_PATH" - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.rubyversion }} @@ -33,7 +53,27 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - uses: extractions/setup-just@v3 + - name: Install just + shell: bash + run: | + set -euo pipefail + install_dir="${RUNNER_TEMP:-/tmp}/just-bin" + mkdir -p "$install_dir" + # Resolve the latest release tag via the github.com redirect to avoid + # api.github.com rate limits on shared runner egress IPs. + latest_url=$(curl -fsSLI -o /dev/null -w '%{url_effective}' https://github.com/casey/just/releases/latest) + just_version="${latest_url##*/tag/}" + case "$RUNNER_OS" in + Windows) asset="just-${just_version}-x86_64-pc-windows-msvc.zip" ;; + macOS) asset="just-${just_version}-x86_64-apple-darwin.tar.gz" ;; + *) asset="just-${just_version}-x86_64-unknown-linux-musl.tar.gz" ;; + esac + curl -fL "https://github.com/casey/just/releases/download/${just_version}/${asset}" -o "$install_dir/$asset" + case "$asset" in + *.zip) unzip -o "$install_dir/$asset" -d "$install_dir" ;; + *) tar -xzf "$install_dir/$asset" -C "$install_dir" ;; + esac + echo "$install_dir" >> "$GITHUB_PATH" - uses: ruby/setup-ruby@v1 with: ruby-version: '3.4' @@ -50,7 +90,27 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - uses: extractions/setup-just@v3 + - name: Install just + shell: bash + run: | + set -euo pipefail + install_dir="${RUNNER_TEMP:-/tmp}/just-bin" + mkdir -p "$install_dir" + # Resolve the latest release tag via the github.com redirect to avoid + # api.github.com rate limits on shared runner egress IPs. + latest_url=$(curl -fsSLI -o /dev/null -w '%{url_effective}' https://github.com/casey/just/releases/latest) + just_version="${latest_url##*/tag/}" + case "$RUNNER_OS" in + Windows) asset="just-${just_version}-x86_64-pc-windows-msvc.zip" ;; + macOS) asset="just-${just_version}-x86_64-apple-darwin.tar.gz" ;; + *) asset="just-${just_version}-x86_64-unknown-linux-musl.tar.gz" ;; + esac + curl -fL "https://github.com/casey/just/releases/download/${just_version}/${asset}" -o "$install_dir/$asset" + case "$asset" in + *.zip) unzip -o "$install_dir/$asset" -d "$install_dir" ;; + *) tar -xzf "$install_dir/$asset" -C "$install_dir" ;; + esac + echo "$install_dir" >> "$GITHUB_PATH" - uses: ruby/setup-ruby@v1 with: ruby-version: '3.4' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a16541..e3a9704 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,27 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - uses: extractions/setup-just@v3 + - name: Install just + shell: bash + run: | + set -euo pipefail + install_dir="${RUNNER_TEMP:-/tmp}/just-bin" + mkdir -p "$install_dir" + # Resolve the latest release tag via the github.com redirect to avoid + # api.github.com rate limits on shared runner egress IPs. + latest_url=$(curl -fsSLI -o /dev/null -w '%{url_effective}' https://github.com/casey/just/releases/latest) + just_version="${latest_url##*/tag/}" + case "$RUNNER_OS" in + Windows) asset="just-${just_version}-x86_64-pc-windows-msvc.zip" ;; + macOS) asset="just-${just_version}-x86_64-apple-darwin.tar.gz" ;; + *) asset="just-${just_version}-x86_64-unknown-linux-musl.tar.gz" ;; + esac + curl -fL "https://github.com/casey/just/releases/download/${just_version}/${asset}" -o "$install_dir/$asset" + case "$asset" in + *.zip) unzip -o "$install_dir/$asset" -d "$install_dir" ;; + *) tar -xzf "$install_dir/$asset" -C "$install_dir" ;; + esac + echo "$install_dir" >> "$GITHUB_PATH" - uses: ruby/setup-ruby@v1 with: ruby-version: '3.4'