ci: add Docker Hub authentication to E2E workflow (#380)

## Summary
- Fix Docker Hub rate limit errors in E2E CI job by adding
authentication
- Pass existing `DOCKERHUB_USERNAME` and `DOCKERHUB_TOKEN` secrets to
the E2E workflow

  ## Problem
The E2E CI job pulls `datahavenxyz/snowbridge-relay:latest` from Docker
Hub without authentication, causing rate limit errors (10 pulls/hour for
unauthenticated requests):
```
Error: initializing source docker://datahavenxyz/snowbridge-relay:latest: reading manifest latest in docker.io/datahavenxyz/snowbridge-relay: toomanyrequests: You have reached your unauthenticated pull rate limit. 
```
  ## Solution
Reuse the Docker Hub secrets already configured for
`docker-build-release` by:
  1. Passing secrets from `CI.yml` to the E2E workflow
  2. Adding optional secrets declaration in `task-e2e.yml`
  3. Adding Docker Hub login step before pulling `snowbridge-relay`

---------

Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
This commit is contained in:
Ahmad Kaouk 2026-01-07 13:06:33 +01:00 committed by GitHub
parent 3de271f2c5
commit aee282613f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View file

@ -73,3 +73,6 @@ jobs:
# Note: GITHUB_TOKEN is automatically available to reusable workflows
with:
image-tag: ${{ needs.docker-build-ci.outputs.image-tag }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View file

@ -21,6 +21,11 @@ on:
description: "The tag of the docker image"
required: true
type: string
secrets:
DOCKERHUB_USERNAME:
required: false
DOCKERHUB_TOKEN:
required: false
permissions:
contents: read
@ -138,6 +143,14 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
if: github.repository == 'datahaven-xyz/datahaven'
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Download Snowbridge relay binary
run: |
docker create --name temp datahavenxyz/snowbridge-relay:latest