Only push Docker tag to latest when tag doesn't contain alpha, beta or rc

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-10-12 14:50:34 +02:00
parent 91e7bd8b68
commit f91e728b91
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 22 additions and 2 deletions

View File

@ -226,22 +226,42 @@ build-docker-main:
script:
- docker buildx build --push --platform linux/amd64 -t framasoft/mobilizon:main -f docker/production/Dockerfile .
build-docker-tag:
# Don't push to latest when building beta/rc tags
build-and-push-to-latest-docker-tag:
<<: *docker
rules: &tag-rules
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
when: never
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_TAG !~ /alpha|beta|rc/
when: never
timeout: 3 hours
script:
- >
docker buildx build
--push
--platform linux/amd64,linux/arm64,linux/arm
--platform linux/amd64,linux/arm
-t framasoft/mobilizon:$CI_COMMIT_TAG
-t framasoft/mobilizon:latest
-f docker/production/Dockerfile .
build-and-push-docker-tag:
<<: *docker
rules: &tag-rules
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
when: never
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_TAG =~ /alpha|beta|rc/
when: never
timeout: 3 hours
script:
- >
docker buildx build
--push
--platform linux/amd64,linux/arm
-t framasoft/mobilizon:$CI_COMMIT_TAG
-f docker/production/Dockerfile .
# Packaging app for amd64
package-app:
image: mobilizon/buildpack:1.14.1-erlang-25.1.1-debian-buster