Skip to content

Commit

Permalink
Publish updates
Browse files Browse the repository at this point in the history
  • Loading branch information
abronin committed Nov 22, 2020
1 parent efdcbd4 commit 7a009bd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,15 @@ const core = __webpack_require__(6470);
const aws = __webpack_require__(9350)

async function run() {
const accessKeyId = core.getInput('aws-access-key-id', { required: false })
const secretAccessKey = core.getInput('aws-secret-access-key', { required: false })
const region = core.getInput('aws-region', { required: false })

const ecr = accessKeyId ? new aws.ECR() : new aws.ECR({accessKeyId, secretAccessKey, region})
const region = core.getInput('aws-region', { required: true })
const ecr = new aws.ECR({ region })

const registryId = core.getInput('aws-account-id', { required: false })
const repositoryName = core.getInput('repository', { required: true })
const imageTag = core.getInput('tag', { required: true })
const newTags = core.getInput('new-tags', { required: true }).replace(/\s+/g, '').split(',')

const getImageParams = { repositoryName, imageIds: [{ imageTag }]}
const getImageParams = { registryId, repositoryName, imageIds: [{ imageTag }]}

let putImageCallback = function(err, result) {
if (err) {
Expand Down

0 comments on commit 7a009bd

Please sign in to comment.