skilld-labs / skilld-docker-container

Starterkit for drupal development
MIT License
20 stars 32 forks source link

Replace Gitlab-CI "only" with "rules" in .gitlabci.yml #446

Closed andypost closed 8 months ago

andypost commented 11 months ago

The keyword is going to be deprecated https://docs.gitlab.com/ee/ci/yaml/#only--except

https://docs.gitlab.com/ee/ci/yaml/workflow.html https://docs.gitlab.com/ee/ci/yaml/#rulesvariables https://docs.gitlab.com/ee/ci/jobs/job_control.html#reuse-rules-in-different-jobs

+# only rune pipelines for merge requests or when tags are pushed  (for triggers)
+workflow:
+  rules:
+    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+    - if: $CI_PIPELINE_SOURCE == "push"
+    - if: $CI_COMMIT_TAG
+    - if: $CI_COMMIT_BRANCH

-  only:
-    - merge_requests
+  rules:
+    - if: $CI_PIPELINE_SOURCE == "merge_request_event"

-  only:
-    - tags
+  rules:
+    - if: $CI_COMMIT_TAG

-  only:
-    - branches
+  rules:
+    - if: $CI_COMMIT_BRANCH