From 71072fbb1229e1317f1a8de6b04206afb461bd67 Mon Sep 17 00:00:00 2001 From: Kyle Harding Date: Wed, 21 Feb 2024 10:32:37 -0500 Subject: [PATCH] Read workflow_search input as a boolean (#273) In commit f6b0bace624032e30a85a8fd9c1a7f8f611f5737 we added a check for !workflow_search before using the current workflow, but with a string this always evaluates to true. This results in always searching workflows, and if enough inputs are unspecified it can find the wrong run id. Signed-off-by: Kyle Harding --- .github/workflows/download.yml | 1 + main.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/download.yml b/.github/workflows/download.yml index 2cadcae8..01247428 100644 --- a/.github/workflows/download.yml +++ b/.github/workflows/download.yml @@ -37,6 +37,7 @@ jobs: with: name: artifact path: artifact + workflow_search: true - name: Test run: cat artifact/sha | grep $GITHUB_SHA download-branch: diff --git a/main.js b/main.js index e087aebf..6fe5d35e 100644 --- a/main.js +++ b/main.js @@ -38,7 +38,7 @@ async function main() { const skipUnpack = core.getBooleanInput("skip_unpack") const ifNoArtifactFound = core.getInput("if_no_artifact_found") let workflow = core.getInput("workflow") - let workflowSearch = core.getInput("workflow_search") + let workflowSearch = core.getBooleanInput("workflow_search") let workflowConclusion = core.getInput("workflow_conclusion") let pr = core.getInput("pr") let commit = core.getInput("commit")