mirror of
https://github.com/docker/login-action.git
synced 2025-09-06 03:56:34 +00:00
Get AccountID from registry URL and handle ECR registry through regexp
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@ -44,6 +44,7 @@ export async function loginECR(registry: string, username: string, password: str
|
||||
const cliPath = await aws.getCLI();
|
||||
const cliVersion = await aws.getCLIVersion();
|
||||
const region = await aws.getRegion(registry);
|
||||
const accountIDs = await aws.getAccountIDs(registry);
|
||||
|
||||
if (await aws.isPubECR(registry)) {
|
||||
core.info(`💡 AWS Public ECR detected with ${region} region`);
|
||||
@ -55,7 +56,7 @@ export async function loginECR(registry: string, username: string, password: str
|
||||
process.env.AWS_SECRET_ACCESS_KEY = password || process.env.AWS_SECRET_ACCESS_KEY;
|
||||
|
||||
core.info(`⬇️ Retrieving docker login command through AWS CLI ${cliVersion} (${cliPath})...`);
|
||||
const loginCmds = await aws.getDockerLoginCmds(cliVersion, registry, region);
|
||||
const loginCmds = await aws.getDockerLoginCmds(cliVersion, registry, region, accountIDs);
|
||||
|
||||
core.info(`🔑 Logging into ${registry}...`);
|
||||
loginCmds.forEach((loginCmd, index) => {
|
||||
|
Reference in New Issue
Block a user