File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 2323
2424permissions :
2525 actions : read
26- id-token : write
2726 contents : read
2827
2928jobs :
@@ -37,13 +36,13 @@ jobs:
3736
3837 - name : Get Available Runners
3938 env :
40- GITHUB_TOKEN : ${{ secrets.RUNNER_PAT }}
39+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4140 id : get-runners
4241 run : |
4342 set -euo pipefail
4443 echo "Fetching available runners..."
4544 response_file=$(mktemp)
46- if ! gh api "/repos /${{ github.repository }}/actions/runners" \
45+ if ! gh api "/orgs /${{ github.repository_owner }}/actions/runners" \
4746 --method GET \
4847 --paginate \
4948 --jq '.runners' > "$response_file";
@@ -80,14 +79,14 @@ jobs:
8079
8180 # 使用JSON格式输出
8281 echo "runners=$filtered_runners" >> $GITHUB_OUTPUT
83- # response=$(gh api /repos /${{ github.repository }}/actions/runners/list )
82+ # response=$(/orgs /${{ github.repository_owner }}/actions/runners)
8483 # if [ -z "$response" ]; then
8584 # echo "No response from GitHub API"
8685 # exit 1
8786 # else
8887 # echo "Response from GitHub API: $response"
8988 # fi
90- # available_runners=$(gh api /repos /${{ github.repository }}/actions/runners/list | jq -r '.runners[] | select(.labels | any(.name | contains("fractal") or contains("edge_td"))) | {name: .name, ip: .ip_address}')
89+ # available_runners=$(/orgs /${{ github.repository_owner }}/actions/runners | jq -r '.runners[] | select(.labels | any(.name | contains("fractal") or contains("edge_td"))) | {name: .name, ip: .ip_address}')
9190 # echo "Available runners: $available_runners"
9291 # echo "runners=$available_runners" >> $GITHUB_OUTPUT
9392
You can’t perform that action at this time.
0 commit comments