Fix: Configurazione workflow Gitea per registry insecure
Build Docker Image for Raspberry Pi / build-and-push (push) Failing after 5m59s
Build Docker Image for Raspberry Pi / build-and-push (push) Failing after 5m59s
- Aggiunta configurazione buildx per registry con http/insecure - Sostituito login-action con autenticazione manuale tramite config.json - Aggiornate versioni actions (buildx v3, build-push v6) - Aggiunto provenance: false e outputs con registry.insecure=true
This commit is contained in:
@@ -30,7 +30,15 @@ jobs:
|
||||
platforms: linux/arm/v7,linux/arm64
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver-opts: |
|
||||
image=moby/buildkit:latest
|
||||
network=host
|
||||
config-inline: |
|
||||
[registry."gitea.home-nas-ds.org"]
|
||||
http = true
|
||||
insecure = true
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
@@ -47,14 +55,22 @@ jobs:
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: gitea.home-nas-ds.org
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
run: |
|
||||
echo "Configurazione autenticazione registry..."
|
||||
mkdir -p ~/.docker
|
||||
AUTH=$(echo -n "${{ github.actor }}:${{ secrets.REGISTRY_TOKEN }}" | base64)
|
||||
cat > ~/.docker/config.json << EOF
|
||||
{
|
||||
"auths": {
|
||||
"gitea.home-nas-ds.org": {
|
||||
"auth": "$AUTH"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.multiarch
|
||||
@@ -68,6 +84,8 @@ jobs:
|
||||
VCS_REF=${{ github.sha }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
provenance: false
|
||||
outputs: type=registry,registry.insecure=true
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.meta.outputs.tags }}
|
||||
|
||||
Reference in New Issue
Block a user