Skip to content
Snippets Groups Projects
Commit 229ea990 authored by michael.minelli's avatar michael.minelli
Browse files

CI/CD => change "main" branch condition to $CI_DEFAULT_BRANCH

parent 42578c02
Branches
No related tags found
1 merge request!1Add LICENSE
Pipeline #26201 passed
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
......@@ -47,7 +47,7 @@ build:
# Here docker buildx can use cached images created in previous step
- docker buildx build --platform $PLATFORMS --file $DOCKERFILE --push --tag $CONTAINER_IMAGE .
rules:
- if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH =~ /^v[0-9]+(\.[0-9]+)*$/'
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /^v[0-9]+(\.[0-9]+)*$/'
release-image:
stage: release
......@@ -57,4 +57,4 @@ release-image:
- docker buildx imagetools create $CONTAINER_IMAGE --tag $CI_REGISTRY_IMAGE:$VERSION
- docker buildx imagetools create $CONTAINER_IMAGE --tag $CI_REGISTRY_IMAGE:latest
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
\ No newline at end of file
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment