mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
Use PAT for API call to prevent throttling
This commit is contained in:
@@ -7,7 +7,8 @@
|
|||||||
source ~/utils/utils.sh
|
source ~/utils/utils.sh
|
||||||
|
|
||||||
# Retrieve the latest major version of the CodeQL Action to use in the base URL for downloading the bundle.
|
# Retrieve the latest major version of the CodeQL Action to use in the base URL for downloading the bundle.
|
||||||
releases=$(curl -s "https://api.github.com/repos/github/codeql-action/releases")
|
[ -n "$API_PAT" ] && authString=(-H "Authorization: token ${API_PAT}")
|
||||||
|
releases=$(curl "${authString[@]}" -s "https://api.github.com/repos/github/codeql-action/releases")
|
||||||
|
|
||||||
# Get the release tags starting with v[0-9] and sort them in descending order, then parse the first one to get the major version.
|
# Get the release tags starting with v[0-9] and sort them in descending order, then parse the first one to get the major version.
|
||||||
codeql_action_latest_major_version=$(echo "$releases" |
|
codeql_action_latest_major_version=$(echo "$releases" |
|
||||||
|
|||||||
Reference in New Issue
Block a user