Skip to content

Commit 933c881

Browse files
committed
Add region and missing .promise()
1 parent a222bc6 commit 933c881

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ async function run () {
55
try {
66
const repositoryName = getInput('DOCKER_REPO_NAME', { required: true })
77

8-
const ecr = new AWS.ECR({ apiVersion: '2015-09-21' })
8+
const ecr = new AWS.ECR({ apiVersion: '2015-09-21', region: process.env.AWS_REGION })
99

1010
let repositoryExists = false
1111
try {
@@ -19,7 +19,7 @@ async function run () {
1919
}
2020

2121
console.log('Repository does not exist. Creating...')
22-
await ecr.createRepository({ repositoryName, imageScanningConfiguration: { scanOnPush: true } })
22+
await ecr.createRepository({ repositoryName, imageScanningConfiguration: { scanOnPush: true } }).promise()
2323

2424
const accessPolicyText = JSON.stringify({
2525
Version: '2008-10-17',

0 commit comments

Comments
 (0)