Skip to content

Commit 040fcf4

Browse files
committed
Don't cache-from Docker Hub twice
When we're building the image to test it, we can attempt to use the upstream Docker Hub image, but when we're ready to publish it, we can rely on the GHA docker cache (which will be warm from the test step) removing a chunk of requests and (hopefully) reducing rate-limiting errors (100 requests per 6 hours).
1 parent ceada69 commit 040fcf4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/actions/build-test-publish/action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ runs:
138138
prefix=${{ inputs.docker-label-prefix }},type=sha,enable=true,priority=100,format=short
139139
140140
# https://github.com/docker/build-push-action
141+
# Note this only uses GHA caches as they should we warm from the previous step.
142+
# This helps with 429 rate limiting errors from Docker Hub.
141143
-
142144
name: 🚀 ${{ inputs.display-as }} (${{ inputs.platforms }})
143145
if: ${{ inputs.publish == 'true' }}
@@ -154,7 +156,6 @@ runs:
154156
type=gha,mode=max
155157
cache-from: |
156158
type=gha,mode=max
157-
type=registry,ref=${{ inputs.docker-image }}:${{ inputs.docker-label-prefix }}latest,mode=max
158159
159160
-
160161
name: 🖋 Docker Hub

0 commit comments

Comments
 (0)