CI_COMMIT_TAG is always empty at pipelines even if I create tag

Hello, we have installed the following version of gitlab using the helm chart for use within our company and we are actively using it. After Only and Except were deprecated, we started using if:rules instead, but we are experiencing the following problem in our gitlab. For example, when we want to get a tag and trigger a pipeline, the CI_COMMIT_TAG variable always returns empty and the pipeline is triggered. When I tried the same process with the exact same pipeline on gitlab.com, the pipeline started without any problems when I got a tag. Here is the simple pipeline I used as an example:

stages:
- aws-token

aws-token:
stage: aws-token
image:
name: amazon/aws-cli
entrypoint: [""]
script:
- echo "aws-token succesfully created"
- echo "CI_COMMIT_BRANCH=$CI_COMMIT_BRANCH"
- echo "CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME"
- echo "CI_COMMIT_TAG=$CI_COMMIT_TAG"
rules:
- if: $CI_COMMIT_TAG

Our system features are as follows:

Output of pipeline running on gitlab.com:
Screenshot 2025-01-03 at 17.03.21

Output of the pipeline running on our self-hosted gitlab:
Screenshot 2025-01-03 at 17.05.04

So we can’t trigger pipelines when we create tag because $CI_COMMIT_TAG always empty.
Now, according to these outputs, is there a problem with our GitLab or is it a problem with the Community Edition or a setting we made?

Topic can be closed because problem solved with information according to GitLab CI/CD `workflow` keyword | GitLab The workflow keyword is evaluated before jobs. For example, if a job is configured to run for tags, but the workflow prevents tag pipelines, the job never runs.

Interesting, but I’m not sure whether I understood that.
No workflow was used in your example snippet. Was your example incomplete?

I’m not sure whether I understood the documentation completely, too.

workflow:
  rules:
    - if: $CI_COMMIT_TAG
      when: never

my-job:
  script:
    - echo "Hello World"
  rules:
    - if: $CI_COMMIT_TAG

Basically, it’s about the following setup, right? Workflow prevents pipelines which are created with a tag, but I have defined a job which should only be triggered by tag.

Yes, you are right, tag pipelines will work correctly in your setup. In my setup, I did not add the workflow section to the post above and there is no section for CI_COMMIT_TAG in my workflow, so the workflow prevents jobs from being started when using the tag.