Add .gitlab-ci.yml

This commit is contained in:
akp 2025-02-08 23:21:27 +00:00
parent 63a844aead
commit baa590f746
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755

20
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,20 @@
workflow:
rules:
- if: '$CI_COMMIT_BRANCH == "build"'
stages:
- build
default:
image: docker
services:
- docker:dind
buildAndPush:
stage: build
before_script:
- "echo $CI_REGISTRY_PASSWORD | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin"
- "docker info"
script:
- "docker build . --file Dockerfile --tag ${CI_REGISTRY_IMAGE}:latest --tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}"
- "docker push --all-tags $CI_REGISTRY_IMAGE"