How to avoid executing Gitlab Job after Branch or Merge

Hi GitLab Community,

I have a question about git branching and merging.

With GitLab we try to observe a special folder where Liquibase changes are observed. After a change was detected the job should generate a new SQL file. This should only happen, when a developer change happened.

My observation shows that GitLab triggers the job always after a branch as feature branch or when the feature branch is merged to the main branch.

From build.yml:

stage: build
- sudo service mysql start
- ci-scripts/update-db-scripts/ 1
- changes:
- “project/src/main/resources/changes/*.xml”
- if: $CI_PIPELINE_SOURCE == “schedule”
when: always
- if: $CI_PIPELINE_SOURCE == “web”
when: always
- when: manual
allow_failure: true

Does anybody know how I can configure the job that it only runs when a change is manually done?