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