diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0c5110..eee2b35 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ black: - black --check --verbose -- . -build: +build:master: stage: build image: name: gcr.io/kaniko-project/executor:v1.9.0-debug @@ -14,4 +14,19 @@ build: - /kaniko/executor --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" - --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}" \ No newline at end of file + --destination "${CI_REGISTRY_IMAGE}:latest" + rules: + - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"' + + +build:master: + stage: build + image: + name: gcr.io/kaniko-project/executor:v1.9.0-debug + entrypoint: [""] + script: + - /kaniko/executor + --context "${CI_PROJECT_DIR}" + --dockerfile "${CI_PROJECT_DIR}/Dockerfile" + --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}" + --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_BRANCH}"