Skip to content

Commit fe96aea

Browse files
aequitasmxsasha
authored andcommitted
Enable Docker Hub login to reduce hitting rate limit
1 parent 2a2a13e commit fe96aea

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/docker.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ jobs:
8989
username: ${{ github.actor }}
9090
password: ${{ secrets.GITHUB_TOKEN }}
9191

92+
- name: Login to Docker Hub to increase rate limit on pulls
93+
# https://github.com/docker/login-action?tab=readme-ov-file#dockerhub
94+
uses: docker/login-action@v3
95+
with:
96+
username: ${{ vars.DOCKERHUB_USERNAME }}
97+
password: ${{ secrets.DOCKERHUB_TOKEN }}
98+
# worst case of this failing is running into Docker Hub rate limit
99+
continue-on-error: true
100+
92101
- name: Set up Docker Buildx
93102
uses: docker/setup-buildx-action@v3
94103

@@ -302,6 +311,15 @@ jobs:
302311
username: ${{ github.actor }}
303312
password: ${{ secrets.GITHUB_TOKEN }}
304313

314+
- name: Login to Docker Hub to increase rate limit on pulls
315+
# https://github.com/docker/login-action?tab=readme-ov-file#dockerhub
316+
uses: docker/login-action@v3
317+
with:
318+
username: ${{ vars.DOCKERHUB_USERNAME }}
319+
password: ${{ secrets.DOCKERHUB_TOKEN }}
320+
# worst case of this failing is running into Docker Hub rate limit
321+
continue-on-error: true
322+
305323
- name: Download images from artifacts (for forked PR's or dependabot)
306324
# trigger only for forked PR's that don't have permissions to push to the container registry
307325
if: ${{ env.use_registry == 'false' }}
@@ -391,6 +409,15 @@ jobs:
391409
username: ${{ github.actor }}
392410
password: ${{ secrets.GITHUB_TOKEN }}
393411

412+
- name: Login to Docker Hub to increase rate limit on pulls
413+
# https://github.com/docker/login-action?tab=readme-ov-file#dockerhub
414+
uses: docker/login-action@v3
415+
with:
416+
username: ${{ vars.DOCKERHUB_USERNAME }}
417+
password: ${{ secrets.DOCKERHUB_TOKEN }}
418+
# worst case of this failing is running into Docker Hub rate limit
419+
continue-on-error: true
420+
394421
- name: Download images from artifacts (for forked PR's or dependabot)
395422
# trigger only for forked PR's that don't have permissions to push to the container registry
396423
if: ${{ env.use_registry == 'false' }}
@@ -451,6 +478,15 @@ jobs:
451478
username: ${{ github.actor }}
452479
password: ${{ secrets.GITHUB_TOKEN }}
453480

481+
- name: Login to Docker Hub to increase rate limit on pulls
482+
# https://github.com/docker/login-action?tab=readme-ov-file#dockerhub
483+
uses: docker/login-action@v3
484+
with:
485+
username: ${{ vars.DOCKERHUB_USERNAME }}
486+
password: ${{ secrets.DOCKERHUB_TOKEN }}
487+
# worst case of this failing is running into Docker Hub rate limit
488+
continue-on-error: true
489+
454490
- name: Download images from artifacts (for forked PR's or dependabot)
455491
# trigger only for forked PR's that don't have permissions to push to the container registry
456492
if: ${{ env.use_registry == 'false' }}
@@ -525,6 +561,15 @@ jobs:
525561
username: ${{ github.actor }}
526562
password: ${{ secrets.GITHUB_TOKEN }}
527563

564+
- name: Login to Docker Hub to increase rate limit on pulls
565+
# https://github.com/docker/login-action?tab=readme-ov-file#dockerhub
566+
uses: docker/login-action@v3
567+
with:
568+
username: ${{ vars.DOCKERHUB_USERNAME }}
569+
password: ${{ secrets.DOCKERHUB_TOKEN }}
570+
# worst case of this failing is running into Docker Hub rate limit
571+
continue-on-error: true
572+
528573
- name: Download images from artifacts (for forked PR's or dependabot)
529574
# trigger only for forked PR's that don't have permissions to push to the container registry
530575
if: ${{ env.use_registry == 'false' }}
@@ -636,6 +681,15 @@ jobs:
636681
username: ${{ github.actor }}
637682
password: ${{ secrets.GITHUB_TOKEN }}
638683

684+
- name: Login to Docker Hub to increase rate limit on pulls
685+
# https://github.com/docker/login-action?tab=readme-ov-file#dockerhub
686+
uses: docker/login-action@v3
687+
with:
688+
username: ${{ vars.DOCKERHUB_USERNAME }}
689+
password: ${{ secrets.DOCKERHUB_TOKEN }}
690+
# worst case of this failing is running into Docker Hub rate limit
691+
continue-on-error: true
692+
639693
- name: Download images from artifacts (for forked PR's or dependabot)
640694
# trigger only for forked PR's that don't have permissions to push to the container registry
641695
if: ${{ env.use_registry == 'false' }}

0 commit comments

Comments
 (0)