微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在github操作中访问github标签消息

如何解决如何在github操作中访问github标签消息

我想在 Github Actions 中捕获 github 标签消息。

如果用户推送带有一些消息的标签,例如

git tag -a 1.0.0 -m "Test Message"

比,我想在 github 操作中捕获该消息(“测试消息”)。

非常感谢任何帮助或参考。

解决方法

如果您无法通过 github 操作运行 git 命令。验证结帐日志,你应该有这样的东西

git version 2.17.1 
Deleting the contents of <YOUR REPO> 
The repository will be downloaded using the GitHub REST API 
To create a local Git repository instead,add Git 2.18 or higher to the PATH
Downloading the archive Writing archive to disk Extracting the archive

根据您的要求安装最新版本的 git。我已使用 PPA 安装在 ubuntu 自托管运行器上。 一旦版本问题得到修复并且 github 操作是克隆 repo 而不是通过 rest api 下载。比使用下面的命令

git fetch --depth=1 origin +refs/tags/*:refs/tags/*
git tag -l --format='%(contents:subject)' ${GITHUB_REF#refs/*/}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。