ci: fix registry login - skip on PRs, add Docker Hub auth
Some checks failed
Build and Push Images / build-nvidia (push) Failing after 31s
Build and Push Images / build-rdna2 (push) Failing after 33s
Build and Push Images / build-strixhalo (push) Failing after 20s
Build and Push Images / build-intel (push) Failing after 25s

- Only login to Gitea registry on push (not PRs)
- Add optional Docker Hub login to avoid pull rate limits
- Requires REGISTRY_USER, REGISTRY_TOKEN secrets in Gitea
- Optional: DOCKERHUB_USERNAME (var) + DOCKERHUB_TOKEN (secret)
This commit is contained in:
2026-02-02 07:35:20 -05:00
parent cb80709d3d
commit e1529ad923

View File

@@ -30,7 +30,17 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
# Login to Docker Hub to avoid pull rate limits
- name: Login to Docker Hub
if: vars.DOCKERHUB_USERNAME != ''
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Only login to Gitea when pushing (not PRs) and secrets are available
- name: Login to Gitea Registry - name: Login to Gitea Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.daviestechlabs.io registry: git.daviestechlabs.io
@@ -70,7 +80,15 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: vars.DOCKERHUB_USERNAME != ''
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Gitea Registry - name: Login to Gitea Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.daviestechlabs.io registry: git.daviestechlabs.io
@@ -110,7 +128,15 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: vars.DOCKERHUB_USERNAME != ''
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Gitea Registry - name: Login to Gitea Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.daviestechlabs.io registry: git.daviestechlabs.io
@@ -150,7 +176,15 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: vars.DOCKERHUB_USERNAME != ''
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Gitea Registry - name: Login to Gitea Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.daviestechlabs.io registry: git.daviestechlabs.io