Resolve reviews

Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
divyansh42 2021-04-09 23:39:13 +05:30
parent 2c3fb7261b
commit eb5edfc198
6 changed files with 89 additions and 25 deletions

View file

@ -159,7 +159,13 @@ async function run(): Promise<void> {
const registryWithoutTrailingSlash = registry.replace(/\/$/, "");
let creds = "";
if (username && password) {
if (username && !password) {
core.warning("Username is provided, but password is missing!");
}
else if (!username && password) {
core.warning("Password is provided, but username is missing!");
}
else if (username && password) {
creds = `${username}:${password}`;
}