ecr input to specify whether the given registry is ECR

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2021-12-20 10:59:11 +01:00
parent b20b9f5e31
commit b9a4d91ee5
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
8 changed files with 29 additions and 15 deletions

View file

@ -5,10 +5,10 @@ import * as stateHelper from './state-helper';
export async function run(): Promise<void> {
try {
const {registry, username, password, logout} = context.getInputs();
stateHelper.setRegistry(registry);
stateHelper.setLogout(logout);
await docker.login(registry, username, password);
const input: context.Inputs = context.getInputs();
stateHelper.setRegistry(input.registry);
stateHelper.setLogout(input.logout);
await docker.login(input.registry, input.username, input.password, input.ecr);
} catch (error) {
core.setFailed(error.message);
}