ci(docker): fix docker build for pre-releases

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-11-30 10:00:05 +01:00
parent 2e4b70cf93
commit 4f15535fa9
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -251,7 +251,7 @@ build-docker-tag:
rules: &release-tag-rules rules: &release-tag-rules
- if: '$CI_PROJECT_NAMESPACE != "framasoft"' - if: '$CI_PROJECT_NAMESPACE != "framasoft"'
when: never when: never
- if: $CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /alpha|beta|rc/ - if: $CI_COMMIT_TAG != null
when: on_success when: on_success
timeout: 3 hours timeout: 3 hours
script: script:
@ -270,23 +270,6 @@ build-docker-tag:
- ARCH: ["arm64"] - ARCH: ["arm64"]
ERL_FLAGS: ["ERL_FLAGS=+JMsingle true"] ERL_FLAGS: ["ERL_FLAGS=+JMsingle true"]
# Don't push to latest when building beta/rc tags
build-and-push-docker-tag:
<<: *docker
rules: &pre-release-tag-rules
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
when: never
- if: $CI_COMMIT_TAG =~ /alpha|beta|rc/
when: on_success
timeout: 3 hours
script:
- >
docker buildx build
--platform linux/amd64
--provenance=false
-t framasoft/mobilizon:$CI_COMMIT_TAG-amd64
-f docker/production/Dockerfile .
# Create manifest and push # Create manifest and push
docker-manifest-push: docker-manifest-push:
<<: *docker <<: *docker