fix(ci): restore working buildx settings pattern with registry push creds
This commit is contained in:
parent
63b1d85450
commit
791f92b503
1 changed files with 26 additions and 13 deletions
|
|
@ -5,16 +5,29 @@ when:
|
|||
steps:
|
||||
- name: build-and-push
|
||||
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
||||
environment:
|
||||
REGISTRY_HOSTPORT: docker-registry.registry.svc.cluster.local:5000
|
||||
REGISTRY_USERNAME:
|
||||
from_secret: DOCKERHUB_USERNAME
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: DOCKERHUB_TOKEN
|
||||
commands:
|
||||
- 'test -n "${REGISTRY_USERNAME}" && test -n "${REGISTRY_PASSWORD}" || (echo "Missing one or more required secrets: DOCKERHUB_USERNAME, DOCKERHUB_TOKEN" && exit 1)'
|
||||
- echo "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOSTPORT}" -u "${REGISTRY_USERNAME}" --password-stdin
|
||||
- docker build -f Dockerfile.simple -t ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:${CI_COMMIT_SHA} -t ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:latest -t ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:high-performance-latest .
|
||||
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:${CI_COMMIT_SHA}
|
||||
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:latest
|
||||
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:high-performance-latest
|
||||
settings:
|
||||
insecure: true
|
||||
registry: docker-registry.registry.svc.cluster.local:5000
|
||||
repo: docker-registry.registry.svc.cluster.local:5000/nxtgauge-admin-solid
|
||||
dockerfile: Dockerfile.simple
|
||||
tags:
|
||||
- ${CI_COMMIT_SHA}
|
||||
- latest
|
||||
- high-performance-latest
|
||||
logins:
|
||||
- registry: https://index.docker.io/v1/
|
||||
username:
|
||||
from_secret: DOCKERHUB_USERNAME
|
||||
password:
|
||||
from_secret: DOCKERHUB_TOKEN
|
||||
- registry: ghcr.io
|
||||
username:
|
||||
from_secret: GHCR_USERNAME
|
||||
password:
|
||||
from_secret: GHCR_TOKEN
|
||||
username:
|
||||
from_secret: REGISTRY_USERNAME
|
||||
password:
|
||||
from_secret: REGISTRY_PASSWORD
|
||||
platforms: linux/amd64
|
||||
no_cache: true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue