From 89e8cdfa29f7dee49d527df6106a9bafee6a46ae Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Mon, 24 Mar 2025 11:23:09 +0800 Subject: [PATCH] ci: fix empty state fro external contributor --- .github/workflows/build-eas-development.yml | 2 +- .github/workflows/build-eas.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-eas-development.yml b/.github/workflows/build-eas-development.yml index 2a8807353..a46791cb2 100644 --- a/.github/workflows/build-eas-development.yml +++ b/.github/workflows/build-eas-development.yml @@ -29,7 +29,7 @@ jobs: id: set-runner run: | runners=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.RUNNER_GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/actions/runners") - available=$(echo "$runners" | jq '.runners[] | select(.status == "online" and .busy == false and .labels[] .name == "self-hosted")') + available=$(echo "$runners" | jq '.runners[]? | select(.status == "online" and .busy == false and .labels[] .name == "self-hosted")') if [ -n "$available" ]; then echo "runner-label=self-hosted" >> $GITHUB_OUTPUT else diff --git a/.github/workflows/build-eas.yml b/.github/workflows/build-eas.yml index 3564486b1..928cdeace 100644 --- a/.github/workflows/build-eas.yml +++ b/.github/workflows/build-eas.yml @@ -36,7 +36,7 @@ jobs: id: set-runner run: | runners=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.RUNNER_GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/actions/runners") - available=$(echo "$runners" | jq '.runners[] | select(.status == "online" and .busy == false and .labels[] .name == "self-hosted")') + available=$(echo "$runners" | jq '.runners[]? | select(.status == "online" and .busy == false and .labels[] .name == "self-hosted")') if [ -n "$available" ]; then echo "runner-label=self-hosted" >> $GITHUB_OUTPUT else