ci: fix secrets injection using secrets: block
This commit is contained in:
parent
60d0aa1fb8
commit
715287e297
1 changed files with 11 additions and 6 deletions
|
|
@ -2,16 +2,21 @@ when:
|
|||
branch: [main, high-performance]
|
||||
event: push
|
||||
|
||||
secrets:
|
||||
- secret: REGISTRY_HOSTPORT
|
||||
name: REGISTRY_HOSTPORT
|
||||
- secret: REGISTRY_USERNAME
|
||||
name: REGISTRY_USERNAME
|
||||
- secret: REGISTRY_PASSWORD
|
||||
name: REGISTRY_PASSWORD
|
||||
|
||||
steps:
|
||||
- name: build-and-push
|
||||
image: registry.nxtgauge.com/docker:28-cli
|
||||
environment:
|
||||
REGISTRY_HOSTPORT:
|
||||
from_secret: REGISTRY_HOSTPORT
|
||||
REGISTRY_USERNAME:
|
||||
from_secret: REGISTRY_USERNAME
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: REGISTRY_PASSWORD
|
||||
REGISTRY_HOSTPORT: ${REGISTRY_HOSTPORT}
|
||||
REGISTRY_USERNAME: ${REGISTRY_USERNAME}
|
||||
REGISTRY_PASSWORD: ${REGISTRY_PASSWORD}
|
||||
commands:
|
||||
- echo "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOSTPORT}" -u "${REGISTRY_USERNAME}" --password-stdin
|
||||
- docker build -t "${REGISTRY_HOSTPORT}/nxtgauge-ai-assistant" -f Dockerfile .
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue