3
0
Fork 0
mirror of https://gitea.com/docker/login-action.git synced 2024-11-26 03:19:37 +01:00

Log AWS region

This commit is contained in:
CrazyMax 2020-08-20 16:03:38 +02:00
parent f37c715508
commit 826c451920
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
2 changed files with 3 additions and 0 deletions

1
dist/index.js generated vendored
View file

@ -1093,6 +1093,7 @@ function run() {
const ecrRegion = yield ecr.getRegion(registry); const ecrRegion = yield ecr.getRegion(registry);
process.env.AWS_ACCESS_KEY_ID = username; process.env.AWS_ACCESS_KEY_ID = username;
process.env.AWS_SECRET_ACCESS_KEY = password; process.env.AWS_SECRET_ACCESS_KEY = password;
core.info(`Logging into AWS ECR region ${ecrRegion}...`);
yield exec.exec('aws', ['ecr', 'get-login', '--region', ecrRegion, '--no-include-email'], true).then(res => { yield exec.exec('aws', ['ecr', 'get-login', '--region', ecrRegion, '--no-include-email'], true).then(res => {
if (res.stderr != '' && !res.success) { if (res.stderr != '' && !res.success) {
throw new Error(res.stderr); throw new Error(res.stderr);

View file

@ -22,6 +22,8 @@ async function run(): Promise<void> {
const ecrRegion = await ecr.getRegion(registry); const ecrRegion = await ecr.getRegion(registry);
process.env.AWS_ACCESS_KEY_ID = username; process.env.AWS_ACCESS_KEY_ID = username;
process.env.AWS_SECRET_ACCESS_KEY = password; process.env.AWS_SECRET_ACCESS_KEY = password;
core.info(`Logging into AWS ECR region ${ecrRegion}...`);
await exec.exec('aws', ['ecr', 'get-login', '--region', ecrRegion, '--no-include-email'], true).then(res => { await exec.exec('aws', ['ecr', 'get-login', '--region', ecrRegion, '--no-include-email'], true).then(res => {
if (res.stderr != '' && !res.success) { if (res.stderr != '' && !res.success) {
throw new Error(res.stderr); throw new Error(res.stderr);