Answers: <p>You don't need a webhook.</p>
  <p>You can use the <code>tags</code> keyword with the <a href="https://docs.gitlab.com/ee/ci/yaml/#onlyrefs--exceptrefs" rel="nofollow noreferrer"><code>only/except</code></a> condition syntax for running jobs in a pipeline.</p>
  <p>You then need to implement the job of course, which will do what you need:</p>
  <ol>
  <li>take the new tag</li>
  <li>update a file with it</li>
  <li>commit the new file and push it back to the repo</li>
  <li>... other builds steps ...</li>
  </ol>
  
Answers: CC BY-SA 4.0
Answers: 2023-03-13T14:57:03.253Z
Answers: 2023-03-13T14:57:03.253Z
Answers: Bruce Becker
Body: <p>I would like to trigger a Build on Gitlab when a Git Tag is pushed to the repository. At the same time I would like to increment the version number on a file located on the repository before building it on a runner.
  My question is . Is it a webhook needed for the purpose ?</p>
  
Tags: <gitlab><gitlab-ci-runner>
Title: Are webhooks needed in Gitlab for triggering a build on tags push
UserDisplayName: Claudio Ferraro
ThreadText: # Are webhooks needed in Gitlab for triggering a build on tags push
  
  (Asked by: username_0 on 2023-03-13)
  
  I would like to trigger a Build on Gitlab when a Git Tag is pushed to the repository. At the same time I would like to increment the version number on a file located on the repository before building it on a runner.
  My question is . Is it a webhook needed for the purpose ?
  
  **Tags:** gitlab, gitlab-ci-runner
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-03-13. Score: 1
  
  You don't need a webhook.
  
  You can use the `tags` keyword with the [`only/except`](https://docs.gitlab.com/ee/ci/yaml/#onlyrefs--exceptrefs) condition syntax for running jobs in a pipeline.
  
  You then need to implement the job of course, which will do what you need:
  
  1. take the new tag
  2. update a file with it
  3. commit the new file and push it back to the repo
  4. ... other builds steps ...
  
  
  ---
  
  