ci: Only build custom images that need to be rebuilt

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2023-01-25 18:39:28 +01:00
parent ccd8e00291
commit 684f0ce8ef
No known key found for this signature in database
10 changed files with 125 additions and 62 deletions

View file

@ -5,7 +5,13 @@ include:
workflow:
rules:
- if: $CI_MERGE_REQUEST_IID
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_SERVER_HOST == "gitlab.com"'
variables:
PUSH_CUSTOM_IMAGE: "true"
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && ($CI_SERVER_HOST == "ops.gitlab.net" || $CI_SERVER_HOST == "dev.gitlab.org")'
variables:
PUSH_CUSTOM_IMAGE: "true"
BASE_BUILD_REGISTRY_IMAGE: $CI_REGISTRY_IMAGE
default:
interruptible: true