Add workflow rules

MSAL

Add workflow:rules to .gitlab-ci.yml to control pipeline creation.

org.openrewrite.gitlab.AddWorkflowRules

Required

The YAML snippet defining the workflow rules.

Optional

acceptTheirsBoolean

When workflow rules already exist, prefer the original value.

mod run . --recipe=org.openrewrite.gitlab.AddWorkflowRules \ -P rules='- if: $CI_PIPELINE_SOURCE == '\''merge_request_event'\''\n- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS\n when: never\n- if: $CI_COMMIT_BRANCH'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.