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

前端 未结 5 1951
不知归路
不知归路 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:44

    I made it work and this is my working code snippet, all others were not working for me

    only:
     - tags  # please mention the 's' compared to Sergio Tomasello's solution
    except:
     - branches
    

    I use 11.4.3

提交回复
热议问题