Skip to content

Conversation

@stphung
Copy link
Owner

@stphung stphung commented Sep 24, 2025

Problem

CI/CD workflows were failing with Docker Hub authentication errors:

Error response from daemon: unauthorized: authentication required

Root Cause

Docker Hub implemented stricter rate limiting in 2024:

  • Anonymous users: 100 pulls per 6 hours per IP
  • GitHub Actions runners frequently hit these limits
  • Container-based jobs need authentication to avoid rate limits

Solution

Added Docker Hub authentication to all container-based CI/CD jobs:

  • Uses docker/login-action@v3 with repository secrets
  • Added to: test-suite, export-linux, export-windows, export-web, export-android
  • Set continue-on-error: true for graceful fallback
  • Increases rate limit from 100 to 200+ pulls per 6 hours

Required Secrets

This PR requires the following repository secrets to be configured:

  • DOCKERHUB_USERNAME: Docker Hub username
  • DOCKERHUB_TOKEN: Docker Hub access token (not password)

Testing

  • Verify all 4 platform builds complete successfully
  • Confirm test suite runs without Docker authentication errors
  • Validate artifacts are generated for all platforms

Fixes the Docker Hub rate limiting issues affecting the CI/CD pipeline.

- Add Docker Hub login step to all container-based jobs
- Use docker/login-action@v3 with secrets for authentication
- Set continue-on-error: true for graceful fallback
- Resolves 'unauthorized: authentication required' errors

This addresses Docker Hub's stricter rate limiting policies in 2024
that affect GitHub Actions workflows using container images.
- Remove container: directive to avoid pre-authentication pulls
- Use docker run with volume mounts instead
- Pull image after authentication step completes
- This allows Docker Hub auth to work before image pulls
- Make Docker Hub authentication conditional on secrets availability
- Add retry logic for image pulls with 10 second delay
- Fallback from 4.4.1 to 4.3.2 if newer version fails
- Use environment variable for dynamic image selection
- This should work even without Docker Hub credentials configured
Added repository secrets should now allow authenticated pulls:
- DOCKERHUB_USERNAME configured
- DOCKERHUB_TOKEN configured

This commit triggers a test of the authentication fix.
Key changes:
- Add auth-setup job to pre-authenticate and pre-pull Docker images
- Use container credentials for direct authentication during pulls
- All export jobs depend on both test-suite and auth-setup
- Revert to simpler container: directive with credentials
- Remove complex Docker run wrapper scripts

This should resolve Docker Hub authentication by handling auth
before container initialization occurs.
This commit triggers a new workflow run to test the pre-authentication
approach with the auth-setup job and container credentials.
@stphung stphung closed this Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant