Added auth for private servers #7

Merged
Philipp merged 30 commits from added-local-auth into main 2023-11-26 22:24:20 +01:00
Showing only changes of commit 5fc053cd76 - Show all commits

View File

@ -117,9 +117,10 @@ async function postCode() {
if (token) { if (token) {
const response = await api.code.set(branch, files_to_push); const response = await api.code.set(branch, files_to_push);
core.info(JSON.stringify(response, null, 2)); core.info(JSON.stringify(response, null, 2));
console.log(`Code set successfully to ${branch}`);
} else { } else {
let response; let response;
core.info(`Logging into as user ${username}`); core.info(`Logging in as user ${username}`);
response = await Promise.resolve() response = await Promise.resolve()
.then(() => api.auth(username, password, login_arguments)) .then(() => api.auth(username, password, login_arguments))
.then(() => { .then(() => {
@ -131,7 +132,7 @@ async function postCode() {
.catch((err) => { .catch((err) => {
console.error("Error:", err); console.error("Error:", err);
}); });
core.info(JSON.stringify(response)); core.info(JSON.stringify(await response));
} }
} }