title: Cannot get !reference to work in .gitlab-ci.yaml
body: <p>I am working with GitLab 14.6.2-ee.</p>
  <p>I am trying to use the YAML reference feature to re-use code snippets in my GitLab configuration files. I've boiled it down to what I think is the simplest use case, but cannot get the file to validate.</p>
  <p>.gitlab-ci.yaml:</p>
  <pre><code>...
  .hidden:
    .update-static-site:
      rules:
          if: $CI_COMMIT_BRANCH =~ /(^develop$|^master$|^staging-.*)/
  
  ...
  trigger-downstream-pipeline:
    stage: .post
    trigger:
      project: project-x/project-x-manifest
      branch: master
    variables:
      SOURCE_COMMIT_SHA: $CI_COMMIT_SHA
      SOURCE_COMMIT_REF_NAME: $CI_COMMIT_REF_NAME
      APP_NAME: project-x
    needs:
      - job: push-project-x-to-harbor
        artifacts: false
    rules:
      - !reference [.hidden, .update-static-site, rules]
  </code></pre>
  <p>I cannot get the <code>!reference</code> line to validate. I keep getting <code>Unresolved tag: !reference</code>.</p>
  <p>I found a SO posting (<a href="https://stackoverflow.com/questions/67028593/gitlab-ci-reuse-rules-with-reference-tag">GitLab CI - Reuse rules with !reference tag</a>) that addresses exactly what I'm trying to do, but it does not work.</p>