mirror of
https://gitea.com/docker/login-action.git
synced 2024-11-23 01:49:36 +01:00
Log AWS region
This commit is contained in:
parent
f37c715508
commit
826c451920
2 changed files with 3 additions and 0 deletions
1
dist/index.js
generated
vendored
1
dist/index.js
generated
vendored
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue