From 1aa38e5236193d2eb9fb51b4c164f9d472f59d6c Mon Sep 17 00:00:00 2001 From: David Hiendl Date: Sat, 2 Dec 2023 16:51:10 +0100 Subject: [PATCH] test --- action.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.js b/action.js index a7c929e..dcf68cb 100644 --- a/action.js +++ b/action.js @@ -26,10 +26,10 @@ try { console.log("headRef=" + headRef) } 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") } - const currentBranch = github.context.ref.slice("refs/head/".length) + const currentBranch = github.context.ref.slice("refs/heads/".length) console.log("git_current_branch=" + currentBranch) core.setOutput("git_current_branch", currentBranch)