From 83035c2b25731498ff02a1b85d95be8870d414c8 Mon Sep 17 00:00:00 2001 From: ein Date: Mon, 31 Jan 2022 21:57:36 -0800 Subject: [PATCH] Only build and push if we're on master and someon modified app --- .gitlab-ci.yml | 7 +++++-- helm/values.yaml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fdd042a7..315fecbb 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,5 +28,8 @@ build_and_push_container: - docker build -t ldooks/dragon-bot:$CI_PIPELINE_ID -t ldooks/dragon-bot:latest . - docker push ldooks/dragon-bot:latest - docker push ldooks/dragon-bot:$CI_PIPELINE_ID - only: - - master + rules: + - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"' + changes: + - app/* + - Dockerfile diff --git a/helm/values.yaml b/helm/values.yaml index 4ae4f924..6366c00f 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -8,7 +8,7 @@ image: repository: ldooks/dragon-bot pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "latest" + tag: "89" imagePullSecrets: [] nameOverride: ""