mirror of
https://github.com/docker/login-action.git
synced 2025-04-22 14:46:37 +02:00
Add support for public ECR
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
7c9afe235c
commit
1e75de0e0e
6 changed files with 121 additions and 23 deletions
|
@ -5,12 +5,24 @@ describe('isECR', () => {
|
|||
test.each([
|
||||
['registry.gitlab.com', false],
|
||||
['gcr.io', false],
|
||||
['012345678901.dkr.ecr.eu-west-3.amazonaws.com', true]
|
||||
['012345678901.dkr.ecr.eu-west-3.amazonaws.com', true],
|
||||
['public.ecr.aws', true]
|
||||
])('given registry %p', async (registry, expected) => {
|
||||
expect(await aws.isECR(registry)).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe('isPubECR', () => {
|
||||
test.each([
|
||||
['registry.gitlab.com', false],
|
||||
['gcr.io', false],
|
||||
['012345678901.dkr.ecr.eu-west-3.amazonaws.com', false],
|
||||
['public.ecr.aws', true]
|
||||
])('given registry %p', async (registry, expected) => {
|
||||
expect(await aws.isPubECR(registry)).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe('getCLI', () => {
|
||||
it('exists', async () => {
|
||||
const awsPath = await aws.getCLI();
|
||||
|
@ -45,10 +57,10 @@ describe('parseCLIVersion', () => {
|
|||
});
|
||||
|
||||
describe('getRegion', () => {
|
||||
test.each([['012345678901.dkr.ecr.eu-west-3.amazonaws.com', 'eu-west-3']])(
|
||||
'given registry %p',
|
||||
async (registry, expected) => {
|
||||
expect(await aws.getRegion(registry)).toEqual(expected);
|
||||
}
|
||||
);
|
||||
test.each([
|
||||
['012345678901.dkr.ecr.eu-west-3.amazonaws.com', 'eu-west-3'],
|
||||
['public.ecr.aws', 'us-east-1']
|
||||
])('given registry %p', async (registry, expected) => {
|
||||
expect(await aws.getRegion(registry)).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue