Predefined variable CI_COMMIT_BRANCH not present in job

I’m running gitlab-runner version 13.5.0, and I’m trying to use the predefined variable CI_COMMIT_BRANCH in workflow:rules as such:

    - if: '$CI_COMMIT_BRANCH == "master"'
      when: manual

however it would not trigger the creation of a manual job, so I ran the ‘export’ command to reveal variable values, and the CI_COMMIT_BRANCH is not present. I’ve tested the job with a workflow:rules condition and the job is created successfully.

To trigger the job, I made a commit locally on master branch, and added a tag, then pushed to gitlab.

I can’t figure out if the CI_COMMIT_BRANCH is suppose to present in this scenario or if I’m experiencing a bug.

I appreciate any help!