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
|
platforms: linux/arm/v7,linux/arm64
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- 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
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
@@ -47,14 +55,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Login to Gitea Container Registry
|
- name: Login to Gitea Container Registry
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@v2
|
run: |
|
||||||
with:
|
echo "Configurazione autenticazione registry..."
|
||||||
registry: gitea.home-nas-ds.org
|
mkdir -p ~/.docker
|
||||||
username: ${{ github.actor }}
|
AUTH=$(echo -n "${{ github.actor }}:${{ secrets.REGISTRY_TOKEN }}" | base64)
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
cat > ~/.docker/config.json << EOF
|
||||||
|
{
|
||||||
|
"auths": {
|
||||||
|
"gitea.home-nas-ds.org": {
|
||||||
|
"auth": "$AUTH"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile.multiarch
|
file: ./Dockerfile.multiarch
|
||||||
@@ -68,6 +84,8 @@ jobs:
|
|||||||
VCS_REF=${{ github.sha }}
|
VCS_REF=${{ github.sha }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
provenance: false
|
||||||
|
outputs: type=registry,registry.insecure=true
|
||||||
|
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
run: echo ${{ steps.meta.outputs.tags }}
|
run: echo ${{ steps.meta.outputs.tags }}
|
||||||
|
|||||||
Reference in New Issue
Block a user