Throw an error if required input is missing (#9)

This commit is contained in:
なつき 2021-10-07 23:12:22 -07:00 committed by GitHub
parent d0c6b3cf9b
commit 44ca406dd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -10,9 +10,9 @@ export interface ActionInputs {
export function getInputs(): ActionInputs {
return {
registry: core.getInput(Inputs.REGISTRY),
username: core.getInput(Inputs.USERNAME),
password: core.getInput(Inputs.PASSWORD),
registry: core.getInput(Inputs.REGISTRY, { required: true }),
username: core.getInput(Inputs.USERNAME, { required: true }),
password: core.getInput(Inputs.PASSWORD, { required: true }),
logout: core.getInput(Inputs.LOGOUT) || "true",
};
}