How to run a gitlab-ci.yml job only on a tagged branch?

前端 未结 5 1915
不知归路
不知归路 2020-12-23 16:24

How do I run a .gitlab-ci.yml job only on a tagged Master branch?

job:
  script:
  - echo \"Do something\"
  only:
  - master
  - tags

The

5条回答
  •  时光说笑
    2020-12-23 16:39

    This behavior is not yet supported by gitlab-ci, although there is an open issue to add it.

    In the meantime I've also heard anecdotal reports that

    only:
      - master
    only:
      - tags
    

    will get the job done (as well as anecdotal reports that it won't).

提交回复
热议问题