How to use the ECRPUBLIC function from aws-sdk

Find comprehensive JavaScript aws-sdk.ECRPUBLIC code examples handpicked from public code repositorys.

7
8
9
10
11
12
13
14
15
16
    repoName: [false, 'Name of repository', 'string']
});

cli.main(async () => {
    try {
        const ecrPublic = new AWS.ECRPUBLIC({region: 'us-east-1'});
        const result = await ecrPublic.describeImages({repositoryName: options.repoName || 'xrengine'}).promise();
        const images = result.imageDetails;
        const withoutLatest = images.filter(image => image.imageTags.indexOf('latest_dev') < 0 && image.imageTags.indexOf('latest_prod') < 0);
        const sorted = withoutLatest.sort((a, b) => b.imagePushedAt - a.imagePushedAt);
fork icon219
star icon0
watch icon1

63
64
65
66
67
68
69
70
71
72

  return authTokenResponse;
}

async function getEcrPublicAuthTokenWrapper(authTokenRequest) {
  const ecrPublic = new aws.ECRPUBLIC({
    customUserAgent: ECR_LOGIN_GITHUB_ACTION_USER_AGENT
  });
  const authTokenResponse = await ecrPublic.getAuthorizationToken(authTokenRequest).promise();
  if (!authTokenResponse) {
fork icon161
star icon714
watch icon23

9
10
11
12
13
14
15
16
17
18
    region: [false, 'Name of AWS region', 'string']
});

cli.main(async () => {
    try {
        const ecr = options.public === true ? new AWS.ECRPUBLIC({region: 'us-east-1'}) : new AWS.ECR({ region: options.region || 'us-east-1' });
        const result = await ecr.describeImages({repositoryName: options.repoName || 'etherealengine'}).promise();
        const images = result.imageDetails;
        const withoutLatest = images.filter(image => image.imageTags == null || (image.imageTags && image.imageTags.indexOf('latest_dev') < 0 && image.imageTags.indexOf('latest_prod') < 0));
        const sorted = withoutLatest.sort((a, b) => b.imagePushedAt - a.imagePushedAt);
fork icon219
star icon593
watch icon38

15
16
17
18
19
20
21
22
23
24

// Get the ECR authorization token
const ecr = new aws.ECR({
  customUserAgent: 'amazon-ecr-login-for-github-actions'
});
const ecrpublic = new aws.ECRPUBLIC({
  customUserAgent: 'amazon-ecr-login-for-github-actions',
  region: 'us-east-1'
});
const authTokenRequest = {};
fork icon161
star icon0
watch icon1