2 Commits

Author SHA1 Message Date
b01057e11a fix: use docker login CLI instead of login-action for Gitea compat
Some checks failed
CI / Test (push) Successful in 2m55s
CI / Lint (push) Successful in 2m49s
CI / Release (push) Successful in 1m53s
CI / Notify (push) Has been cancelled
CI / Docker Build & Push (push) Has been cancelled
docker/login-action@v3 fails with 'Username and password required' on
Gitea Actions — secrets not passed to action with: inputs. Switch to
direct docker login CLI which reliably interpolates secrets in run: steps.
2026-02-21 19:34:30 -05:00
7c0be6d00e fix: switch Docker registry to HTTPS endpoint with login-action
Some checks failed
CI / Test (push) Successful in 2m52s
CI / Lint (push) Successful in 2m48s
CI / Release (push) Successful in 1m36s
CI / Docker Build & Push (push) Failing after 8m21s
CI / Notify (push) Successful in 2s
- Replace gitea-http.gitea.svc.cluster.local:3000 with registry.lab.daviestechlabs.io
- Use docker/login-action@v3 for Gitea registry auth (proper buildx integration)
- Remove manual base64 auth to ~/.docker/config.json (not picked up by buildkit)
- Remove insecure registry daemon.json config and Docker restart
- Remove buildkitd insecure registry config
- Remove cache-from/cache-to type=gha (not supported on Gitea Actions)

Fixes 401 Unauthorized: reqPackageAccess on Docker push
2026-02-21 18:05:43 -05:00

View File

@@ -9,8 +9,8 @@ on:
env: env:
NTFY_URL: http://ntfy.observability.svc.cluster.local:80 NTFY_URL: http://ntfy.observability.svc.cluster.local:80
GOPRIVATE: git.daviestechlabs.io GOPRIVATE: git.daviestechlabs.io
REGISTRY: gitea-http.gitea.svc.cluster.local:3000/daviestechlabs REGISTRY: registry.lab.daviestechlabs.io/daviestechlabs
REGISTRY_HOST: gitea-http.gitea.svc.cluster.local:3000 REGISTRY_HOST: registry.lab.daviestechlabs.io
IMAGE_NAME: voice-assistant IMAGE_NAME: voice-assistant
jobs: jobs:
@@ -123,40 +123,13 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
with:
buildkitd-config-inline: | - name: Login to Gitea Registry
[registry."gitea-http.gitea.svc.cluster.local:3000"] run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "${{ env.REGISTRY_HOST }}" -u "${{ secrets.REGISTRY_USER }}" --password-stdin
http = true
insecure = true
- name: Login to Docker Hub - name: Login to Docker Hub
if: vars.DOCKERHUB_USERNAME != '' if: vars.DOCKERHUB_USERNAME != ''
uses: docker/login-action@v3 run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ vars.DOCKERHUB_USERNAME }}" --password-stdin
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Configure Docker for insecure registry
run: |
sudo mkdir -p /etc/docker
echo '{"insecure-registries": ["${{ env.REGISTRY_HOST }}"]}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker || sudo service docker restart || true
sleep 2
- name: Login to Gitea Registry
run: |
AUTH=$(echo -n "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_TOKEN }}" | base64 -w0)
mkdir -p ~/.docker
cat > ~/.docker/config.json << EOF
{
"auths": {
"${{ env.REGISTRY_HOST }}": {
"auth": "$AUTH"
}
}
}
EOF
echo "Auth configured for ${{ env.REGISTRY_HOST }}"
- name: Extract metadata - name: Extract metadata
id: meta id: meta
@@ -175,8 +148,7 @@ jobs:
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
notify: notify:
name: Notify name: Notify