From e847740205352c65dc0aaf96b0be79d2140d7caa Mon Sep 17 00:00:00 2001 From: DIYgod Date: Tue, 22 Apr 2025 18:57:29 +0800 Subject: [PATCH] chore: add macos check for ios self hosted runner check --- .github/workflows/build-ios-development.yml | 4 ++-- .github/workflows/build-ios.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-ios-development.yml b/.github/workflows/build-ios-development.yml index 50b07e47d..6bca6ac81 100644 --- a/.github/workflows/build-ios-development.yml +++ b/.github/workflows/build-ios-development.yml @@ -25,9 +25,9 @@ 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 == "macOS")') if [ -n "$available" ]; then - echo "runner-label=self-hosted" >> $GITHUB_OUTPUT + echo "runner-label=[self-hosted, macOS]" >> $GITHUB_OUTPUT else echo "runner-label=macos-latest" >> $GITHUB_OUTPUT fi diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index a0c4be32f..5aecb46c7 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -32,9 +32,9 @@ 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 == "macOS")') if [ -n "$available" ]; then - echo "runner-label=self-hosted" >> $GITHUB_OUTPUT + echo "runner-label=[self-hosted, macOS]" >> $GITHUB_OUTPUT else echo "runner-label=macos-latest" >> $GITHUB_OUTPUT fi