From f98dc888db38d607bcd814bf8d88ff185606acad Mon Sep 17 00:00:00 2001 From: kuannie1 Date: Fri, 1 Nov 2024 15:47:23 -0700 Subject: [PATCH 1/3] try this change --- .github/actions/get-github-ref-names/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/get-github-ref-names/action.yml b/.github/actions/get-github-ref-names/action.yml index 91787ba1..8ff32e2d 100644 --- a/.github/actions/get-github-ref-names/action.yml +++ b/.github/actions/get-github-ref-names/action.yml @@ -30,6 +30,9 @@ runs: if (eventName === "pull_request") { head = context.payload.pull_request.head.ref; base = context.payload.pull_request.base.ref; + } else if (eventName === "workflow_dispatch") { + head = context.payload.workflow_dispatch.head.ref; + base = context.payload.workflow_dispatch.base.ref; } else if (eventName === "push") { // TODO: this won't work with tags const pruneHead = "refs/heads/"; From d4afcea951fb4490b54e6551b84eee7c37a211bd Mon Sep 17 00:00:00 2001 From: kuannie1 Date: Fri, 1 Nov 2024 15:56:59 -0700 Subject: [PATCH 2/3] try again given https://docs.github.com/en/webhooks/webhook-events-and-payloads\#workflow_dispatch --- .github/actions/get-github-ref-names/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/get-github-ref-names/action.yml b/.github/actions/get-github-ref-names/action.yml index 8ff32e2d..ae775bbe 100644 --- a/.github/actions/get-github-ref-names/action.yml +++ b/.github/actions/get-github-ref-names/action.yml @@ -31,8 +31,8 @@ runs: head = context.payload.pull_request.head.ref; base = context.payload.pull_request.base.ref; } else if (eventName === "workflow_dispatch") { - head = context.payload.workflow_dispatch.head.ref; - base = context.payload.workflow_dispatch.base.ref; + head = context.payload.workflow_dispatch.ref; + base = context.payload.workflow_dispatch.ref; } else if (eventName === "push") { // TODO: this won't work with tags const pruneHead = "refs/heads/"; From d156a83ee6a47128cf4775f02c7a1d27d4d9629e Mon Sep 17 00:00:00 2001 From: kuannie1 Date: Fri, 1 Nov 2024 16:07:15 -0700 Subject: [PATCH 3/3] try again, just using branch --- .github/actions/get-github-ref-names/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/get-github-ref-names/action.yml b/.github/actions/get-github-ref-names/action.yml index ae775bbe..1927953b 100644 --- a/.github/actions/get-github-ref-names/action.yml +++ b/.github/actions/get-github-ref-names/action.yml @@ -31,8 +31,8 @@ runs: head = context.payload.pull_request.head.ref; base = context.payload.pull_request.base.ref; } else if (eventName === "workflow_dispatch") { - head = context.payload.workflow_dispatch.ref; - base = context.payload.workflow_dispatch.ref; + head = context.payload.ref; + base = context.payload.ref; } else if (eventName === "push") { // TODO: this won't work with tags const pruneHead = "refs/heads/";