From c6a0320563b7d228c02af56fb0d54bb50bdb7326 Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Fri, 7 Apr 2023 14:33:27 -0600 Subject: [PATCH] round 2 --- .gitlab-ci.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) 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}"