|
|
|
@ -160,6 +160,7 @@ function getInputs() {
|
|
|
|
|
registry: core.getInput('registry'),
|
|
|
|
|
username: core.getInput('username'),
|
|
|
|
|
password: core.getInput('password'),
|
|
|
|
|
ecr: core.getInput('ecr'),
|
|
|
|
|
logout: core.getBooleanInput('logout')
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
@ -206,9 +207,9 @@ exports.loginECR = exports.loginStandard = exports.logout = exports.login = void
|
|
|
|
|
const aws = __importStar(__nccwpck_require__(35981));
|
|
|
|
|
const core = __importStar(__nccwpck_require__(42186));
|
|
|
|
|
const exec = __importStar(__nccwpck_require__(71514));
|
|
|
|
|
function login(registry, username, password) {
|
|
|
|
|
function login(registry, username, password, ecr) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
if (aws.isECR(registry)) {
|
|
|
|
|
if (/true/i.test(ecr) || (ecr == 'auto' && aws.isECR(registry))) {
|
|
|
|
|
yield loginECR(registry, username, password);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
@ -328,10 +329,10 @@ const stateHelper = __importStar(__nccwpck_require__(88647));
|
|
|
|
|
function run() {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
try {
|
|
|
|
|
const { registry, username, password, logout } = context.getInputs();
|
|
|
|
|
stateHelper.setRegistry(registry);
|
|
|
|
|
stateHelper.setLogout(logout);
|
|
|
|
|
yield docker.login(registry, username, password);
|
|
|
|
|
const input = context.getInputs();
|
|
|
|
|
stateHelper.setRegistry(input.registry);
|
|
|
|
|
stateHelper.setLogout(input.logout);
|
|
|
|
|
yield docker.login(input.registry, input.username, input.password, input.ecr);
|
|
|
|
|
}
|
|
|
|
|
catch (error) {
|
|
|
|
|
core.setFailed(error.message);
|
|
|
|
|