From cbb2480b4e57e031742c00c4da75bf277f46b4af Mon Sep 17 00:00:00 2001 From: spacedandy-agents-simplex <342056592+spacedandy-agents-simplex@users.noreply.github.com> Date: Fri, 16 Oct 2026 21:00:40 +0000 Subject: [PATCH] ci: pass the branch name to jq as an argument in the iOS artifact lookup The branch name was part of the jq program text, so a branch named to close the string could select an artifact from a fork or another branch. Same fix as the desktop lookup. --- scripts/ci/ios-sim/earlier-run.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ci/ios-sim/earlier-run.sh b/scripts/ci/ios-sim/earlier-run.sh index 752bea6292..7081bd08b1 100755 --- a/scripts/ci/ios-sim/earlier-run.sh +++ b/scripts/ci/ios-sim/earlier-run.sh @@ -8,10 +8,10 @@ set -euo pipefail name=$1 -run_id=$(gh api "repos/$GITHUB_REPOSITORY/actions/artifacts?name=$name&per_page=100" --jq " +run_id=$(gh api "repos/$GITHUB_REPOSITORY/actions/artifacts?name=$name&per_page=100" | jq -r --arg branch "$GITHUB_REF_NAME" ' [.artifacts[] - | select((.expired | not) and .workflow_run.head_branch == \"$GITHUB_REF_NAME\" and .workflow_run.head_repository_id == .workflow_run.repository_id)] - | sort_by(.created_at) | last | .workflow_run.id // empty") + | select((.expired | not) and .workflow_run.head_branch == $branch and .workflow_run.head_repository_id == .workflow_run.repository_id)] + | sort_by(.created_at) | last | .workflow_run.id // empty') if [ -n "$run_id" ]; then echo "$name: from run $run_id" echo "run-id=$run_id" >> "$GITHUB_OUTPUT"