From 71246ca4b1af48f872e5ce10f56f776ad625c600 Mon Sep 17 00:00:00 2001 From: Altay Date: Mon, 3 Aug 2026 22:01:37 +0300 Subject: [PATCH] ci(release): fix Homebrew bot identity lookup quoting Use a multiline script so nested quotes do not break gh api, and fail if the resolved user id is not numeric. Co-authored-by: Cursor --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 758c1c8..a5b95e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -292,9 +292,17 @@ jobs: - name: Resolve Homebrew release bot user ID id: homebrew-release-bot-user - run: echo "user-id=$(gh api "/users/${{ steps.homebrew-release-bot.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" env: GH_TOKEN: ${{ steps.homebrew-release-bot.outputs.token }} + APP_SLUG: ${{ steps.homebrew-release-bot.outputs.app-slug }} + run: | + set -euo pipefail + user_id="$(gh api "/users/${APP_SLUG}[bot]" --jq .id)" + if [[ ! "$user_id" =~ ^[0-9]+$ ]]; then + echo "failed to resolve numeric bot user id for ${APP_SLUG}[bot]" >&2 + exit 1 + fi + echo "user-id=${user_id}" >> "$GITHUB_OUTPUT" - name: Release to Homebrew tap uses: Justintime50/homebrew-releaser@a62d7a359683bfc047cdb2431f53ee58241464d1 # v3