簡體   English   中英

如何在 github 操作中訪問 github 標簽消息

[英]How to access github tag message in github actions

我想在 Github 操作中捕獲 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 操作將克隆存儲庫,而不是通過 rest api 下載。 比使用以下命令

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM