chore: add macos check for ios self hosted runner check
This commit is contained in:
parent
3343ddb658
commit
e847740205
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue