Skip to content

Commit 8232914

Browse files
authored
Read booleans from input using getBooleanInput (#627)
1 parent 971a7f2 commit 8232914

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
fileName: "*"
6161
tarBall: true
6262
zipBall: true
63+
extract: true
6364
token: ${{ secrets.RELEASE_DOWNLOADER_TEST_TOKEN }}
6465
out-file-path: "./downloader-test"
6566

dist/index.js

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/input-helper.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function getInputs(): IReleaseDownloadSettings {
2121
}
2222
downloadSettings.sourceRepoPath = repositoryPath
2323

24-
const latestFlag = core.getInput("latest") === "true"
24+
const latestFlag = core.getBooleanInput("latest")
2525
const ghTag = core.getInput("tag")
2626
const releaseId = core.getInput("releaseId")
2727

@@ -42,11 +42,11 @@ export function getInputs(): IReleaseDownloadSettings {
4242

4343
downloadSettings.fileName = core.getInput("fileName")
4444

45-
downloadSettings.tarBall = core.getInput("tarBall") === "true"
45+
downloadSettings.tarBall = core.getBooleanInput("tarBall")
4646

47-
downloadSettings.zipBall = core.getInput("zipBall") === "true"
47+
downloadSettings.zipBall = core.getBooleanInput("zipBall")
4848

49-
downloadSettings.extractAssets = core.getInput("extract") === "true"
49+
downloadSettings.extractAssets = core.getBooleanInput("extract")
5050

5151
const outFilePath = core.getInput("out-file-path") || "."
5252
downloadSettings.outFilePath = path.resolve(githubWorkspacePath, outFilePath)

0 commit comments

Comments
 (0)