diff --git a/action.yml b/action.yml index d754df0..9133670 100755 --- a/action.yml +++ b/action.yml @@ -42,9 +42,13 @@ runs: # in order to increase the limit of 60 requests per hour per IP address to a higher value that's also counted # per GitHub account. # Caching is disabled in order not to receive stale responses from Varnish cache fronting GitHub API. + RELEASE_HEADER='' + if [ ! -z "${{github.token}}" ]; then + RELEASE_HEADER="--header 'authorization: Bearer ${{ github.token }}'" + fi RELEASE_INFO="$(curl --silent --show-error --fail \ - --header 'authorization: Bearer ${{ github.token }}' \ --header 'Cache-Control: no-cache, must-revalidate' \ + ${RELEASE_HEADER} \ "${RELEASE_URL}")" RELEASE_NAME="$(echo "${RELEASE_INFO}" | jq --raw-output ".name")" LOCATION="$(echo "${RELEASE_INFO}" \