From 990713e6eca992bf384cb1b0aa2b2872a383ca9f Mon Sep 17 00:00:00 2001 From: "Christian M. Todie" Date: Thu, 22 Oct 2026 11:28:45 -0400 Subject: [PATCH] ci(tap): pass the read-only installer token to the install step only Private tools' formulae (tap #3) fetch release assets with HOMEBREW_GITHUB_API_TOKEN. The workflow reads it from the Actions secret of the same name and sets it on the install-and-test step only. pull_request runs from forks get no secrets. Until the secret exists the variable is empty: herdr is unaffected, and a private formula fails loudly naming the variable. --- .github/workflows/tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fc00bb9..e27206e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,6 +37,12 @@ jobs: brew tap unsigned-gg/unsigned "$GITHUB_WORKSPACE" echo "formulae: $(find Formula -name '*.rb' | wc -l)" - name: Install and test every formula (developer mode off) + # Private tools' formulae (lib/github_private_release_download_strategy.rb) read this read-only + # token, scoped to Contents read on their cerebral-work repos only. It is set on THIS step alone. + # pull_request runs from forks get no secrets, so a fork PR cannot read it. Without it, a + # private formula fails loudly, naming the variable. + env: + HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }} run: | set -euo pipefail shopt -s nullglob