File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,8 +148,19 @@ jobs:
148148
149149 - name : Install crane
150150 if : steps.check-talos.outputs.exists == 'false'
151+ env :
152+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
151153 run : |
152- VERSION=$(curl -s https://api.github.com/repos/google/go-containerregistry/releases/latest | jq -r .tag_name)
154+ # Authenticate the API call: unauthenticated requests from shared
155+ # Actions runners hit the 60/hr rate limit and return JSON without
156+ # .tag_name, leaving VERSION=null and a 404 download URL.
157+ VERSION=$(curl -fsSL -H "Authorization: Bearer ${GH_TOKEN}" \
158+ https://api.github.com/repos/google/go-containerregistry/releases/latest | jq -r .tag_name)
159+ if [ -z "${VERSION}" ] || [ "${VERSION}" = "null" ]; then
160+ echo "Failed to resolve latest crane version" >&2
161+ exit 1
162+ fi
163+ echo "Installing crane ${VERSION}"
153164 curl -fsSL "https://github.com/google/go-containerregistry/releases/download/${VERSION}/go-containerregistry_Linux_x86_64.tar.gz" | sudo tar -xz -C /usr/local/bin crane
154165
155166 - name : Start local registry
You can’t perform that action at this time.
0 commit comments