gitlab-ci: Build on merge request, upload only on main branch commits
This commit is contained in:
parent
0fb6521f83
commit
21ba138fa9
1 changed files with 25 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
# Only used in https://gitlab.com/fedora/ostree/ci-test
|
||||
# For tests running in the Fedora infrastructure, see .zuul.yaml and
|
||||
# https://fedoraproject.org/wiki/Zuul-based-ci
|
||||
# As those are not official images, we build all available variants
|
||||
|
||||
# See: https://gitlab.com/fedora/ostree/buildroot
|
||||
image: quay.io/fedora-ostree-desktops/buildroot
|
||||
|
@ -10,8 +11,29 @@ image: quay.io/fedora-ostree-desktops/buildroot
|
|||
stages:
|
||||
- build
|
||||
|
||||
# As those are not official images, we build all available variants
|
||||
# Only build the images for merge requests
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- just compose-image $VARIANT
|
||||
parallel:
|
||||
matrix:
|
||||
- VARIANT:
|
||||
- silverblue
|
||||
- kinoite
|
||||
- kinoite-mobile
|
||||
- sway-atomic
|
||||
- xfce-atomic
|
||||
- lxqt-atomic
|
||||
- budgie-atomic
|
||||
- base-atomic
|
||||
# - kinoite-nightly
|
||||
# - kinoite-devel
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
|
||||
# Build and upload the images for commits pushed to the branch & scheduled pipelines
|
||||
build-upload:
|
||||
stage: build
|
||||
script:
|
||||
- just compose-image $VARIANT
|
||||
|
@ -30,3 +52,5 @@ build:
|
|||
- cosmic-atomic
|
||||
# - kinoite-nightly
|
||||
# - kinoite-devel
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == "main" && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule")
|
||||
|
|
Loading…
Reference in a new issue