Add support for AWS Elastic Container Registry (ECR)

Add example for Google Container Registry (GCR)
This commit is contained in:
CrazyMax
2020-08-20 15:59:36 +02:00
parent e6dc03b339
commit f37c715508
5 changed files with 169 additions and 23 deletions

7
src/ecr.ts Normal file
View File

@@ -0,0 +1,7 @@
export const isECR = async (registry: string): Promise<boolean> => {
return registry.includes('amazonaws');
};
export const getRegion = async (registry: string): Promise<string> => {
return registry.substring(registry.indexOf('ecr.') + 4, registry.indexOf('.amazonaws'));
};