File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed
.github/actions/docker-login Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change 29
29
username : ${{ inputs.username }}
30
30
password : ${{ inputs.password }}
31
31
32
+ - name : Install regctl
33
+ uses : regclient/actions/regctl-installer@ce5fd131e371ffcdd7508b478cb223b3511a9183
34
+
32
35
- name : Check Docker Hub Rate Limits
33
36
shell : bash
34
- env :
35
- DOCKER_USERNAME : ${{ inputs.username }}
36
- DOCKER_PASSWORD : ${{ inputs.password }}
37
- run : |
38
- if [ "$AUTH_EXISTS" = "true" ]; then
39
- echo "Authenticated."
40
- TOKEN=$(curl -s --user "${DOCKER_USERNAME}:${DOCKER_PASSWORD}" "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
41
- else
42
- echo "Unauthenticated."
43
- TOKEN=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
44
- fi
45
- echo "Rate limits:"
46
- curl -s --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest 2>&1 | grep ratelimit
37
+ run : regctl image ratelimit ubuntu:latest
You can’t perform that action at this time.
0 commit comments