Update .gitea/workflows/build-and-push.yaml
Some checks failed
Build and Push Container Image / build-and-push (push) Failing after 5s

This commit is contained in:
2026-04-27 11:43:49 +00:00
parent 607abefb98
commit a77cd96c26

View File

@@ -31,16 +31,20 @@ jobs:
fi
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
- name: Configure Docker for insecure registry
- name: Setup registry auth
run: |
REGISTRY_HOST=$(echo "${{ gitea.server_url }}" | sed 's|https\?://||')
mkdir -p /etc/docker
echo "{\"insecure-registries\": [\"${REGISTRY_HOST}\"]}" > /etc/docker/daemon.json
- name: Login to Gitea registry
run: |
REGISTRY_HOST=$(echo "${{ gitea.server_url }}" | sed 's|https\?://||')
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "http://${REGISTRY_HOST}" -u ${{ gitea.actor }} --password-stdin
AUTH=$(echo -n "${{ gitea.actor }}:${{ secrets.REGISTRY_TOKEN }}" | base64)
mkdir -p ~/.docker
cat > ~/.docker/config.json <<EOF
{
"auths": {
"${REGISTRY_HOST}": {
"auth": "${AUTH}"
}
}
}
EOF
- name: Build and push image
run: |