Reputation: 291
I want to capture the github tag message in Github Actions.
If user pushes tag with some message e.g.
git tag -a 1.0.0 -m "Test Message"
than, I would like to capture that message("Test Message") inside the github actions.
Any help or reference is much appreciated.
Upvotes: 4
Views: 1364
Reputation: 291
If you are not able to run git command through github actions. Validate the checkout log, you should have something like this
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
Install the latest version of git as per your requirement. I have used PPA to install on ubuntu self hosted runner. Once version issue is fixed and github action is cloning the repo instead of downloading through rest api. Than use below command
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
git tag -l --format='%(contents:subject)' ${GITHUB_REF#refs/*/}
Upvotes: 5