Added an local rebuilding.
All checks were successful
Lint / pre-commit Linting (push) Successful in 45s
All checks were successful
Lint / pre-commit Linting (push) Successful in 45s
This commit is contained in:
parent
6f5729c12a
commit
0537c5a914
10
index.js
10
index.js
@ -98,8 +98,6 @@ async function postCode() {
|
|||||||
|
|
||||||
const login_arguments = {
|
const login_arguments = {
|
||||||
token: token,
|
token: token,
|
||||||
username: username,
|
|
||||||
password: password,
|
|
||||||
protocol: protocol,
|
protocol: protocol,
|
||||||
hostname: hostname,
|
hostname: hostname,
|
||||||
port: port,
|
port: port,
|
||||||
@ -116,8 +114,12 @@ async function postCode() {
|
|||||||
core.error(errorMessage);
|
core.error(errorMessage);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
let api;
|
||||||
const api = new ScreepsAPI(login_arguments);
|
if (token) {
|
||||||
|
api = new ScreepsAPI(login_arguments);
|
||||||
|
} else {
|
||||||
|
api = new ScreepsAPI(username, password, login_arguments);
|
||||||
|
}
|
||||||
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));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user