38 lines
812 B
YAML
38 lines
812 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: build and push
|
|
image: docker:dind
|
|
volumes:
|
|
- name: docker.sock
|
|
path: /var/run
|
|
environment:
|
|
CI_REGISTRY:
|
|
from_secret: CI_REGISTRY
|
|
CI_REGISTRY_USER:
|
|
from_secret: CI_REGISTRY_USER
|
|
CI_REGISTRY_PASSWORD:
|
|
from_secret: CI_REGISTRY_PASSWORD
|
|
CI_APP_IMAGE:
|
|
from_secret: CI_APP_IMAGE
|
|
commands:
|
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
- docker buildx build --push --platform linux/amd64 --tag $CI_APP_IMAGE --file Dockerfile .
|
|
when:
|
|
branch:
|
|
- master
|
|
|
|
services:
|
|
- name: docker
|
|
image: docker:dind
|
|
privileged: true
|
|
volumes:
|
|
- name: docker.sock
|
|
path: /var/run
|
|
|
|
trigger:
|
|
event:
|
|
- push
|