Commit from within pipeline no longer triggers a new pipeline after upgrading 18.3.1

We had a pipeline that used bumpversion to auto-bump a version number and set a new tag. This commit and tag where pushed back to the gitlab repository from within the pipeline.

After upgrading to 18.3.1, this no longer works. When our pipeline runs and updates the version and tags, the pipeline to run on the tag is not triggered. We don't see it being "skipped" either, it is really just not triggered.

The used to work 18.2.4, and we experienced this issue after upgrading to 18.3.1

Example of pipeline:

pipeline doing the commit:

  script:
    - bumpversion patch
    - ls -l
    - cat .bumpversion.cfg
    - git push origin HEAD:$CI_COMMIT_BRANCH
    - git push origin --tags
  rules:
    - if: '$CI_COMMIT_MESSAGE =~ /^Bump version:/'
      when: never
    # in all other cases, we can continue and do the version bump
    - if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"'

pipeline that runs after the commit/tag (the part not being triggered now):

  script:
    - <redacted>
  rules:
    - if: '$CI_COMMIT_TAG'
      when: always

Just to be absolutely clear on this: this worked perfectly on the previous version, and broke on the new version! No changes on the pipeline were made after the upgrade.

Edited by 🤖 GitLab Bot 🤖