Skip to content
Snippets Groups Projects

Disable pipelines on default branch for non canonical projects

+ 3
0
@@ -98,6 +98,9 @@ workflow:
variables:
<<: *next-ruby-variables
PIPELINE_NAME: 'Scheduled Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline'
# For `$CI_DEFAULT_BRANCH` branch in forks, don't create a pipeline
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_NAMESPACE !~ /^gitlab(-org|-cn)?($|\/)/'
when: never
# This work around https://gitlab.com/gitlab-org/gitlab/-/issues/332411 whichs prevents usage of dependency proxy
# when pipeline is triggered by a project access token.
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $GITLAB_USER_LOGIN =~ /project_\d+_bot\d*/'
Loading