From a394004ec682443e5aab47997d5b848deedfea77 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 8 Mar 2022 18:03:43 +0000 Subject: [PATCH] Update workflow rules fro gitlab-ci --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7e9bd92..6f5ecfe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,14 +18,14 @@ variables: workflow: rules: + # Restrict the number of times the pipeline runs to save resources/limits - if: $CI_PIPELINE_SOURCE == 'merge_request_event' variables: CI_BRANCH: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME CI_PULL_REQUEST: $CI_MERGE_REQUEST_IID - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == 'push' - when: never - - if: $CI_PIPELINE_SOURCE == 'web' || $CI_PIPELINE_SOURCE == 'schedule' - - if: $CI_COMMIT_BRANCH + when: never # Avoid running the pipeline twice (push + merge request) + - if: $CI_COMMIT_BRANCH || $CI_COMMIT_TAG cache: key: pip-pipx-pre-commit-$CI_JOB_IMAGE