overleaf-sso/.gitlab-ci.yml

29 lines
1.1 KiB
YAML
Raw Normal View History

# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Docker.gitlab-ci.yml
2021-05-28 19:11:39 +00:00
# Build a Docker image with CI/CD and push to the GitLab registry.
# Docker-in-Docker documentation: https://docs.gitlab.com/ee/ci/docker/using_docker_build.html
#
# This template uses one generic job with conditional builds
# for the default branch and all other (MR) branches.
2021-05-28 19:32:50 +00:00
docker-build:
# Use the official docker image.
2022-06-11 03:34:58 +00:00
cache: [] # disable cache to prevent old layers
image: docker:dind
variables:
stage: build
when: manual
services:
- docker:dind
before_script:
2023-02-27 09:11:31 +00:00
- echo "$CI_REGISTRY_PASSWORD" | docker login glcr.cklau.cc --username "$CI_REGISTRY_USER" --password-stdin
# Default branch leaves tag empty (= latest tag)
# All other branches are tagged with the escaped branch name (commit ref slug)
2021-05-28 19:11:39 +00:00
script:
- |
2023-02-27 09:11:31 +00:00
docker build -t "glcr.cklau.cc/bayes-cluster/overleaf-sso" .
docker push "glcr.cklau.cc/bayes-cluster/overleaf-sso"