This commit is contained in:
Stephan 2022-03-18 17:50:11 +01:00
parent fa0c7b9ac1
commit 86dab14dfd

View File

@ -75,11 +75,12 @@ module.exports = /*async*/ ({github, context, core}) => {
// tag must not exist
try {
const ref = await restapi.git.getRef({
const refs = await restapi.git.listMatchingRefs({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/' + tag
})
console.log(refs)
core.setFailed(`Tag '${tag}' already exists.`)
return
}