mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
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:
parent
3de271f2c5
commit
aee282613f
2 changed files with 16 additions and 0 deletions
3
.github/workflows/CI.yml
vendored
3
.github/workflows/CI.yml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
13
.github/workflows/task-e2e.yml
vendored
13
.github/workflows/task-e2e.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue