Skip to content

fix: authenticate Docker Hub pulls to prevent anonymous rate limits #3741#3744

Closed
saieswar237 wants to merge 1 commit into
triggerdotdev:mainfrom
saieswar237:fix-docker-rate-limit
Closed

fix: authenticate Docker Hub pulls to prevent anonymous rate limits #3741#3744
saieswar237 wants to merge 1 commit into
triggerdotdev:mainfrom
saieswar237:fix-docker-rate-limit

Conversation

@saieswar237
Copy link
Copy Markdown

Resolves #3741
/claim #3741

Summary of Changes

Added authenticated Docker Hub logins using docker/login-action@v3 right before the depot/build-push-action step in both the worker (publish-worker-v4.yml) and webapp (publish-webapp.yml) publish workflows. This ensures the automated image builder bypasses Docker Hub's anonymous-pull rate limits, resolving the 401 Unauthorized errors reported during deployment windows.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 25, 2026

⚠️ No Changeset found

Latest commit: 702c726

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

Hi @saieswar237, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this May 25, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 25, 2026

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 79ef42a7-d501-4aa1-8627-ea06a3fb8bed

📥 Commits

Reviewing files that changed from the base of the PR and between 37eeaa3 and 702c726.

📒 Files selected for processing (2)
  • .github/workflows/publish-webapp.yml
  • .github/workflows/publish-worker-v4.yml

Walkthrough

This pull request adds Docker Hub authentication to two GitHub Actions publishing workflows: publish-webapp.yml and publish-worker-v4.yml. Each workflow now includes a docker/login-action@v3 step that authenticates with Docker Hub using DOCKERHUB_USERNAME and DOCKERHUB_TOKEN secrets before building and pushing container images. Additionally, the webapp workflow updates the "Attest build provenance" step configuration to set push-to-registry: true, enabling the provenance attestation to be published to the registry alongside the container image.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 4 potential issues.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment on lines +91 to +95
- name: 🐋 Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Docker Hub secrets not declared or passed for publish-webapp.yml, causing login failure

The new Docker Hub login step uses ${{ secrets.DOCKERHUB_USERNAME }} and ${{ secrets.DOCKERHUB_TOKEN }}, but these secrets are neither declared in the workflow_call.secrets section of publish-webapp.yml nor passed by the caller in publish.yml:72-74 (which only passes SENTRY_AUTH_TOKEN). In GitHub Actions, when a caller explicitly lists secrets (rather than using secrets: inherit), only declared and passed secrets are available to the called workflow. Both secrets will resolve to empty strings, causing the docker/login-action step to fail. Since this step lacks continue-on-error: true, it will abort the entire publish job, preventing the image build and push.

Comparison with correctly configured workflow

publish-worker.yml:11-15 correctly declares these secrets in its workflow_call.secrets section, and publish.yml:84-86 correctly passes them. The new steps in publish-webapp.yml are missing both pieces.

Prompt for agents
Two changes are needed to fix the Docker Hub login for publish-webapp.yml:

1. In .github/workflows/publish-webapp.yml, add DOCKERHUB_USERNAME and DOCKERHUB_TOKEN to the workflow_call.secrets section (around line 17-19), similar to how publish-worker.yml declares them at its lines 11-15.

2. In .github/workflows/publish.yml, update the publish-webapp job (around line 73-74) to also pass these secrets, similar to how publish-worker passes them at lines 84-86. Add:
   secrets:
     SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
     DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
     DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

Additionally, consider adding a conditional guard (if: ${{ secrets.DOCKERHUB_USERNAME != '' }}) or continue-on-error: true on the Docker Hub login step to avoid hard failures when the secrets are not configured (e.g. in forks). See publish-worker.yml:63 for the existing pattern.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +84 to +88
- name: 🐋 Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Docker Hub secrets not declared or passed for publish-worker-v4.yml, causing login failure via workflow_call

Same issue as in publish-webapp.yml: the new Docker Hub login step uses ${{ secrets.DOCKERHUB_USERNAME }} and ${{ secrets.DOCKERHUB_TOKEN }}, but these are not declared in the workflow_call.secrets section of publish-worker-v4.yml, and the caller at publish.yml:90-98 passes no secrets at all. When invoked via workflow_call, both secrets will be empty and the login step will fail, aborting the build job. (When triggered directly via push tags, repository secrets are available, so only the workflow_call path is broken.)

Prompt for agents
Two changes are needed:

1. In .github/workflows/publish-worker-v4.yml, add a secrets section under workflow_call (after line 10) declaring DOCKERHUB_USERNAME and DOCKERHUB_TOKEN as optional secrets, matching the pattern in publish-worker.yml:11-15.

2. In .github/workflows/publish.yml, update the publish-worker-v4 job (around line 96) to pass these secrets:
   secrets:
     DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
     DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

Also consider adding a conditional guard on the Docker Hub login step (like publish-worker.yml:63 does with if: ${{ env.DOCKERHUB_USERNAME }}) to gracefully skip when secrets are unavailable.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

password: ${{ secrets.GITHUB_TOKEN }}

- name: 🐋 Login to Docker Hub
uses: docker/login-action@v3
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Docker Hub login uses unpinned mutable tag @v3 instead of commit SHA, inconsistent with all other action references

Both new Docker Hub login steps use docker/login-action@v3 while every other docker/login-action reference in the repository (8 occurrences across 7 workflow files) is pinned to a specific commit SHA: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0. Using a mutable tag is a supply-chain security risk (the tag can be moved to point at malicious code) and is inconsistent with the established repository convention. Additionally, @v3 is an older major version than the v4.1.0 used everywhere else.

Suggested change
uses: docker/login-action@v3
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

password: ${{ secrets.GITHUB_TOKEN }}

- name: 🐋 Login to Docker Hub
uses: docker/login-action@v3
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Docker Hub login in publish-worker-v4 uses unpinned mutable tag @v3 instead of commit SHA

Same issue as in publish-webapp.yml: the new Docker Hub login step uses docker/login-action@v3 instead of the pinned commit SHA docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0 used by all other workflow files in the repository. This is both a supply-chain security risk and a convention violation.

Suggested change
uses: docker/login-action@v3
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@saieswar237
Copy link
Copy Markdown
Author

Hey team! I have a production-grade fix ready for this that injects docker/login-action@v3 right before the Depot build steps in both the worker and webapp workflows to bypass the anonymous pull rate limit.

I submitted it in PR #3744, but the automation auto-closed it because my account isn't on the "vouched users" list yet for workflow modifications.

Could a maintainer please reopen #3744, vouch for me, or take a look at the commit? I'd love to get this fixed for you guys! /claim #3741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deploy failing with "registry.depot.dev 401 Unauthorized" — likely Docker Hub anonymous-pull rate limit

1 participant