4 Commits
v0.2.0 ... main

Author SHA1 Message Date
22744bf0bd fix: use type=raw for Docker tags to preserve v prefix
Some checks failed
CI / Lint (push) Successful in 2m32s
CI / Test (push) Successful in 2m40s
CI / Release (push) Successful in 1m27s
CI / Docker Build & Push (push) Failing after 2m48s
CI / Notify (push) Successful in 1s
docker/metadata-action type=semver strips the v prefix, causing
tag mismatch between git tags (v0.1.3) and Docker tags (0.1.3).
Switch to type=raw to pass through the version as-is.
2026-02-22 09:58:46 -05:00
29c8ad0d60 fix: switch Docker build to plain docker build/push with insecure registry
All checks were successful
CI / Test (push) Successful in 3m0s
CI / Release (push) Successful in 1m29s
CI / Lint (push) Successful in 2m58s
CI / Notify (push) Successful in 2s
CI / Docker Build & Push (push) Successful in 3m3s
- Drop buildx (setup-buildx-action, build-push-action)
- Use insecure HTTP registry with SIGHUP daemon reload
- Use org-level PAT secrets for registry auth
2026-02-21 22:38:04 -05:00
fff57ef774 fix: use docker login CLI instead of login-action for Gitea compat
Some checks failed
CI / Lint (push) Successful in 2m54s
CI / Release (push) Successful in 1m32s
CI / Test (push) Successful in 2m51s
CI / Docker Build & Push (push) Has been cancelled
CI / Notify (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:32 -05:00
95fcca4147 fix: switch Docker registry to HTTPS endpoint with login-action
Some checks failed
CI / Test (push) Successful in 2m53s
CI / Lint (push) Successful in 2m55s
CI / Release (push) Successful in 1m38s
CI / Docker Build & Push (push) Failing after 5m54s
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:45 -05:00

View File

@@ -121,42 +121,19 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Docker Buildx - name: Configure insecure registry
uses: docker/setup-buildx-action@v3
with:
buildkitd-config-inline: |
[registry."gitea-http.gitea.svc.cluster.local:3000"]
http = true
insecure = true
- name: Login to Docker Hub
if: vars.DOCKERHUB_USERNAME != ''
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Configure Docker for insecure registry
run: | run: |
sudo mkdir -p /etc/docker sudo mkdir -p /etc/docker
echo '{"insecure-registries": ["${{ env.REGISTRY_HOST }}"]}' | sudo tee /etc/docker/daemon.json echo '{"insecure-registries": ["${{ env.REGISTRY_HOST }}"]}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker || sudo service docker restart || true sudo kill -SIGHUP "$(pidof dockerd)" || true
sleep 2 sleep 3
- name: Login to Gitea Registry - name: Login to Gitea Registry
run: | run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "${{ env.REGISTRY_HOST }}" -u "${{ secrets.REGISTRY_USER }}" --password-stdin
AUTH=$(echo -n "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_TOKEN }}" | base64 -w0)
mkdir -p ~/.docker - name: Login to Docker Hub
cat > ~/.docker/config.json << EOF if: vars.DOCKERHUB_USERNAME != ''
{ run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ vars.DOCKERHUB_USERNAME }}" --password-stdin
"auths": {
"${{ env.REGISTRY_HOST }}": {
"auth": "$AUTH"
}
}
}
EOF
echo "Auth configured for ${{ env.REGISTRY_HOST }}"
- name: Extract metadata - name: Extract metadata
id: meta id: meta
@@ -164,19 +141,25 @@ jobs:
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: | tags: |
type=semver,pattern={{version}},value=${{ needs.release.outputs.version }} type=raw,value=${{ needs.release.outputs.version }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.release.outputs.version }}
type=raw,value=latest,enable={{is_default_branch}} type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push - name: Build and push
uses: docker/build-push-action@v5 run: |
with: # Build with all tags
context: . TAGS=""
push: true while IFS= read -r tag; do
tags: ${{ steps.meta.outputs.tags }} [ -n "$tag" ] && TAGS="$TAGS -t $tag"
labels: ${{ steps.meta.outputs.labels }} done <<< "${{ steps.meta.outputs.tags }}"
cache-from: type=gha docker build $TAGS \
cache-to: type=gha,mode=max --label "org.opencontainers.image.source=${{ gitea.server_url }}/${{ gitea.repository }}" \
--label "org.opencontainers.image.revision=${{ gitea.sha }}" \
.
# Push each tag
while IFS= read -r tag; do
[ -n "$tag" ] && docker push "$tag"
done <<< "${{ steps.meta.outputs.tags }}"
notify: notify:
name: Notify name: Notify