title: How to avoid a loop in GitLab CI/CD
body: <p>I am trying to update the tag of a version.json file in a repo and commit the same file to the repository through GitLab CI. This results in pipeline falling into a loop.</p>
  <pre><code>only:
    refs:
      - master
  except:
    changes:
        - version.json
  </code></pre>
  <p>If I place the above block in the CI logic, the Pipeline does not pick this stage and if I remove the except block the Pipeline goes on incrementing the tag in version.json.</p>
  <p>I am stuck with this since couple of days and any help would be appreciated.</p>