From fe96aea4604a201e4e2a4f64d62f71b596d8de92 Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Mon, 14 Oct 2024 18:05:43 +0200 Subject: [PATCH] Enable Docker Hub login to reduce hitting rate limit --- .github/workflows/docker.yml | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c233815cf..aa805731d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -89,6 +89,15 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to Docker Hub to increase rate limit on pulls + # https://github.com/docker/login-action?tab=readme-ov-file#dockerhub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + # worst case of this failing is running into Docker Hub rate limit + continue-on-error: true + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -302,6 +311,15 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to Docker Hub to increase rate limit on pulls + # https://github.com/docker/login-action?tab=readme-ov-file#dockerhub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + # worst case of this failing is running into Docker Hub rate limit + continue-on-error: true + - name: Download images from artifacts (for forked PR's or dependabot) # trigger only for forked PR's that don't have permissions to push to the container registry if: ${{ env.use_registry == 'false' }} @@ -391,6 +409,15 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to Docker Hub to increase rate limit on pulls + # https://github.com/docker/login-action?tab=readme-ov-file#dockerhub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + # worst case of this failing is running into Docker Hub rate limit + continue-on-error: true + - name: Download images from artifacts (for forked PR's or dependabot) # trigger only for forked PR's that don't have permissions to push to the container registry if: ${{ env.use_registry == 'false' }} @@ -451,6 +478,15 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to Docker Hub to increase rate limit on pulls + # https://github.com/docker/login-action?tab=readme-ov-file#dockerhub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + # worst case of this failing is running into Docker Hub rate limit + continue-on-error: true + - name: Download images from artifacts (for forked PR's or dependabot) # trigger only for forked PR's that don't have permissions to push to the container registry if: ${{ env.use_registry == 'false' }} @@ -525,6 +561,15 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to Docker Hub to increase rate limit on pulls + # https://github.com/docker/login-action?tab=readme-ov-file#dockerhub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + # worst case of this failing is running into Docker Hub rate limit + continue-on-error: true + - name: Download images from artifacts (for forked PR's or dependabot) # trigger only for forked PR's that don't have permissions to push to the container registry if: ${{ env.use_registry == 'false' }} @@ -636,6 +681,15 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to Docker Hub to increase rate limit on pulls + # https://github.com/docker/login-action?tab=readme-ov-file#dockerhub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + # worst case of this failing is running into Docker Hub rate limit + continue-on-error: true + - name: Download images from artifacts (for forked PR's or dependabot) # trigger only for forked PR's that don't have permissions to push to the container registry if: ${{ env.use_registry == 'false' }}