This commit is contained in:
David Hiendl 2023-12-02 16:51:10 +01:00
parent 29c27575d5
commit 1aa38e5236

View File

@ -26,10 +26,10 @@ try {
console.log("headRef=" + headRef) console.log("headRef=" + headRef)
} else if(!isTag) { } else if(!isTag) {
if(!github.context.ref.startsWith("refs/head/")) { if(!github.context.ref.startsWith("refs/heads/")) {
throw new Error("Failed to determine branch for non-PR and non-Tag action") throw new Error("Failed to determine branch for non-PR and non-Tag action")
} }
const currentBranch = github.context.ref.slice("refs/head/".length) const currentBranch = github.context.ref.slice("refs/heads/".length)
console.log("git_current_branch=" + currentBranch) console.log("git_current_branch=" + currentBranch)
core.setOutput("git_current_branch", currentBranch) core.setOutput("git_current_branch", currentBranch)