Skip to content

Commit

Permalink
Read workflow_search input as a boolean (#273)
Browse files Browse the repository at this point in the history
In commit f6b0bac 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 <kyle@balena.io>
  • Loading branch information
klutchell committed Feb 21, 2024
1 parent 72aaadc commit 71072fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/download.yml
Expand Up @@ -37,6 +37,7 @@ jobs:
with:
name: artifact
path: artifact
workflow_search: true
- name: Test
run: cat artifact/sha | grep $GITHUB_SHA
download-branch:
Expand Down
2 changes: 1 addition & 1 deletion main.js
Expand Up @@ -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")
Expand Down

0 comments on commit 71072fb

Please sign in to comment.