fix(ci): configure kaniko auth for local registry

This commit is contained in:
Ashwin Kumar 2026-04-10 21:18:26 +02:00
parent 2bfb0774ee
commit 161c07ddbf

View file

@ -5,7 +5,14 @@ when:
steps: steps:
- name: build-and-push - name: build-and-push
image: gcr.io/kaniko-project/executor:v1.23.2-debug image: gcr.io/kaniko-project/executor:v1.23.2-debug
environment:
REGISTRY_USERNAME:
from_secret: REGISTRY_USERNAME
REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD
commands: commands:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"docker-registry.registry.svc.cluster.local:5000\":{\"username\":\"${REGISTRY_USERNAME}\",\"password\":\"${REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json
- >- - >-
/kaniko/executor /kaniko/executor
--context . --context .