ci: build and push docker image
Signed-off-by: Vojtech Mares <iam@vojtechmares.com>
This commit is contained in:
parent
da0b92c936
commit
38e1389976
1 changed files with 18 additions and 0 deletions
18
.gitlab-ci.yml
Normal file
18
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
default:
|
||||
image: ubuntu:22.04
|
||||
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
build:
|
||||
stage: build
|
||||
variables:
|
||||
IMAGE: $CI_REGISTRY_IMAGE
|
||||
TAG: $CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA
|
||||
before_script:
|
||||
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
||||
- docker info
|
||||
script:
|
||||
- docker build -t $IMAGE:$TAG .
|
||||
- docker push $IMAGE:$TAG
|
||||
Reference in a new issue