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:
|
steps:
|
||||||
- name: build-and-push
|
- name: build-and-push
|
||||||
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
||||||
environment:
|
settings:
|
||||||
REGISTRY_HOSTPORT: docker-registry.registry.svc.cluster.local:5000
|
insecure: true
|
||||||
REGISTRY_USERNAME:
|
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
|
from_secret: DOCKERHUB_USERNAME
|
||||||
REGISTRY_PASSWORD:
|
password:
|
||||||
from_secret: DOCKERHUB_TOKEN
|
from_secret: DOCKERHUB_TOKEN
|
||||||
commands:
|
- registry: ghcr.io
|
||||||
- 'test -n "${REGISTRY_USERNAME}" && test -n "${REGISTRY_PASSWORD}" || (echo "Missing one or more required secrets: DOCKERHUB_USERNAME, DOCKERHUB_TOKEN" && exit 1)'
|
username:
|
||||||
- echo "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOSTPORT}" -u "${REGISTRY_USERNAME}" --password-stdin
|
from_secret: GHCR_USERNAME
|
||||||
- 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 .
|
password:
|
||||||
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:${CI_COMMIT_SHA}
|
from_secret: GHCR_TOKEN
|
||||||
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:latest
|
username:
|
||||||
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:high-performance-latest
|
from_secret: REGISTRY_USERNAME
|
||||||
|
password:
|
||||||
|
from_secret: REGISTRY_PASSWORD
|
||||||
|
platforms: linux/amd64
|
||||||
|
no_cache: true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue