From b98890fba6d6954e0181d310e5dbb805ac639b21 Mon Sep 17 00:00:00 2001 From: Steven Roomberg Date: Wed, 3 Jun 2026 16:15:20 -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 | 88 +++++++++++++++++++++++++++++++++-- .github/workflows/publish.yml | 22 ++++++++- 2 files changed, 105 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c615316e4..746938aa0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,27 @@ jobs: ['8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25'] 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: actions/setup-java@v5 with: distribution: 'zulu' @@ -37,7 +57,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: actions/setup-java@v5 with: distribution: 'zulu' @@ -65,7 +105,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: actions/setup-java@v5 with: distribution: 'zulu' @@ -85,7 +145,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: actions/setup-java@v5 with: distribution: 'zulu' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 62401a45f..b3f519322 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,7 +30,27 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 0 - - 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: actions/setup-java@v5 with: distribution: 'zulu'