3
0
Fork 0
mirror of https://gitea.com/docker/login-action.git synced 2024-11-29 12:59:35 +01:00
This commit is contained in:
CrazyMax 2020-08-20 16:12:46 +02:00
parent 16b2f90c24
commit b7cd11b1fa
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
2 changed files with 2 additions and 13 deletions

7
dist/index.js generated vendored
View file

@ -1090,12 +1090,7 @@ function run() {
const username = core.getInput('username'); const username = core.getInput('username');
const password = core.getInput('password', { required: true }); const password = core.getInput('password', { required: true });
if (yield ecr.isECR(registry)) { if (yield ecr.isECR(registry)) {
yield exec.exec('aws', ['--version'], true).then(res => { yield exec.exec('aws', ['--version'], false);
if (res.stderr != '' && !res.success) {
throw new Error(res.stderr);
}
core.info(`💡 Using ${res.stdout}`);
});
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;

View file

@ -19,13 +19,7 @@ async function run(): Promise<void> {
const password: string = core.getInput('password', {required: true}); const password: string = core.getInput('password', {required: true});
if (await ecr.isECR(registry)) { if (await ecr.isECR(registry)) {
await exec.exec('aws', ['--version'], true).then(res => { await exec.exec('aws', ['--version'], false);
if (res.stderr != '' && !res.success) {
throw new Error(res.stderr);
}
core.info(`💡 Using ${res.stdout}`);
});
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;