How to run puipeline automatically based on the tags & merge requests

Can anyone help me how to run a pipeline based on the tags & merge requests?

image

If it is a merge request means pipeline should be manual & If it is tag means pipeline should automatically run.

how to achieve this.

Thanks.

Use rules instead of only

your-job:
...
  rules:
    - if: $CI_COMMIT_TAG
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
      when: manual
1 Like

Yeah, thank you so much @Iduoad !!

1 Like