diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 490ea85f1..c9eb2cf6f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,12 +40,8 @@ stages: # Extra rules for packaging .monado.packaging.conditions: rules: - # Only the default branch of the "upstream" repo. - - if: "$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH" - when: on_success - # Otherwise, don't build packages. - - when: never - + # Only the default branch of the "upstream" repo on push. + - if: $CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" ### ### diff --git a/.gitlab-ci/templates/.gitlab-ci.yml.jinja b/.gitlab-ci/templates/.gitlab-ci.yml.jinja index 6ed7fb358..7d9504cac 100644 --- a/.gitlab-ci/templates/.gitlab-ci.yml.jinja +++ b/.gitlab-ci/templates/.gitlab-ci.yml.jinja @@ -55,12 +55,8 @@ stages: # Extra rules for packaging .monado.packaging.conditions: rules: - # Only the default branch of the "upstream" repo. - - if: "$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH" - when: on_success - # Otherwise, don't build packages. - - when: never - + # Only the default branch of the "upstream" repo on push. + - if: $CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" {% include 'include.win_containers.yml' %} {% include 'include.ci-containers-variables.yml.jinja' %}