diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec10a95f261d079ce30b29fe6e38277e7185f3a5..4a8bb911ac39f4dbef1bf3327a6bd460f40b777e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,11 @@ variables: GIT_STRATEGY: clone GIT_DEPTH: "500" +# only rune pipelines for merge requests or when tags are pushed (for triggers) +workflow: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_TAG + lint: stage: verify image: alpinelinux/apkbuild-lint-tools:latest @@ -13,8 +18,8 @@ lint: script: - lint allow_failure: true - only: - - merge_requests + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" tags: - docker-alpine - x86_64 @@ -32,8 +37,8 @@ lint: - logs/ expire_in: 1 day when: always - only: - - merge_requests + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" build-x86_64: extends: .build @@ -119,8 +124,8 @@ build-riscv64-emulated: trigger_build_image: stage: trigger - only: - - tags + rules: + - if: $CI_COMMIT_TAG variables: APORTS_TAG: $CI_COMMIT_TAG trigger: