From 307d74482b55d39bc6c2bbf47cc59d7fa2fafe45 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 14 Oct 2025 17:05:45 -0300 Subject: [PATCH] ci: add Docker Hub authentication to test workflow to avoid rate limits (#10278) * ci: add Docker Hub login step to CI workflow to avoid rate limits * Introduced a new step in the Docker CI workflow to log in to Docker Hub using credentials stored in GitHub secrets. This enhances the workflow by ensuring that the build process can push images to Docker Hub securely. * ci: add Docker Hub credentials to CI workflow for secure image testing * Updated the CI workflow to include Docker Hub credentials as secrets for the Docker image testing job. This ensures secure access to Docker Hub during the CI process, enhancing the reliability of image builds and tests. --- .github/workflows/ci.yml | 3 +++ .github/workflows/docker_test.yml | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e372dc689b..588ba51d0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -338,6 +338,9 @@ jobs: name: Test Docker Images if: ${{ needs.path-filter.outputs.docker == 'true' && needs.set-ci-condition.outputs.should-run-tests == 'true' }} uses: ./.github/workflows/docker_test.yml + secrets: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} # https://github.com/langchain-ai/langchain/blob/master/.github/workflows/check_diffs.yml ci_success: diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 9505cd8a09..259ed26d97 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -2,6 +2,11 @@ name: Test Docker images on: workflow_call: + secrets: + DOCKERHUB_USERNAME: + required: true + DOCKERHUB_TOKEN: + required: true workflow_dispatch: env: @@ -43,6 +48,12 @@ jobs: if command -v docker &> /dev/null; then docker buildx du || true fi + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build image run: | ${{ env.CONTAINER_RUNTIME }} build -t langflowai/langflow:latest-dev \