From 0307cab21f17a9aa55e5b76d536c7d9878ff8d8c Mon Sep 17 00:00:00 2001 From: Songtronix Date: Wed, 31 Mar 2021 16:25:35 +0200 Subject: [PATCH] change(ci): only create artifacts triggered by schedule --- .gitlab/CI/publish.gitlab-ci.yml | 4 ++-- .gitlab/CI/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab/CI/publish.gitlab-ci.yml b/.gitlab/CI/publish.gitlab-ci.yml index e8266403df..ee9a82a86f 100644 --- a/.gitlab/CI/publish.gitlab-ci.yml +++ b/.gitlab/CI/publish.gitlab-ci.yml @@ -5,7 +5,7 @@ tags: - veloren-docker rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" when: always - when: never @@ -31,4 +31,4 @@ pages: - rm -rf public - mkdir -p public - cargo doc --no-deps --document-private-items - - mv target/doc/* public \ No newline at end of file + - mv target/doc/* public diff --git a/.gitlab/CI/release.yml b/.gitlab/CI/release.yml index 7a59bd5b60..3de8a59b94 100644 --- a/.gitlab/CI/release.yml +++ b/.gitlab/CI/release.yml @@ -9,12 +9,12 @@ - when: manual allow_failure: true -# Template to only run if pushes to master or a tag happened +# Template to only run if pushes to master or a tag happened and it being triggered by a schedule .release: stage: build tags: - veloren-docker rules: - - if: $CI_COMMIT_REF_NAME =~ /^master$/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/ + - if: $CI_PIPELINE_SOURCE == "schedule" && ( $CI_COMMIT_REF_NAME =~ /^master$/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/ ) when: always - when: never