正在运行的github动作的标签推不执行



我是yml语言的新手,只是设置了一个github操作流程,手动工作得很好,但是当我试图使它在特定标签的推送上工作时,它不起作用:

我正在尝试在执行

后执行yml
git commit -am "my commit"
git tag cicd11
git push

and my .yml开头如下:

on:
push:
tags:
- cicd**

我读过很多关于SO的问题,但似乎没有人在标签上做推送,根据手册,这应该是可能的。谢谢你。

您需要完全限定标记。每个文档:https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore

A tag named v2 (refs/tags/v2)

你可以试试**cicd**refs/tags/cicd**

在仔细阅读了myz540建议的文档后,我意识到我的yaml是正确的,在推送期间需要的是--tags,即:

git commit -am "my commit"
git tag cicd11
git push --tags

就是这样,yaml保持不变:

on:
push:
tags:
- cicd**

最新更新