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
No related branches found
No related tags found
1 merge request!1Add LICENSE
Pipeline #26201 passed
...@@ -47,7 +47,7 @@ build: ...@@ -47,7 +47,7 @@ build:
# Here docker buildx can use cached images created in previous step # Here docker buildx can use cached images created in previous step
- docker buildx build --platform $PLATFORMS --file $DOCKERFILE --push --tag $CONTAINER_IMAGE . - docker buildx build --platform $PLATFORMS --file $DOCKERFILE --push --tag $CONTAINER_IMAGE .
rules: 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: release-image:
stage: release stage: release
...@@ -57,4 +57,4 @@ release-image: ...@@ -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:$VERSION
- docker buildx imagetools create $CONTAINER_IMAGE --tag $CI_REGISTRY_IMAGE:latest - docker buildx imagetools create $CONTAINER_IMAGE --tag $CI_REGISTRY_IMAGE:latest
rules: rules:
- if: '$CI_COMMIT_BRANCH == "main"' - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
\ No newline at end of file \ 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