mirror of
https://github.com/docker/login-action.git
synced 2025-04-27 17:16:35 +02:00
update to node 16
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
6af3c118c8
commit
4b59a429db
17 changed files with 2541 additions and 56040 deletions
|
@ -2,7 +2,8 @@ import * as core from '@actions/core';
|
|||
import {ECR} from '@aws-sdk/client-ecr';
|
||||
import {ECRPUBLIC} from '@aws-sdk/client-ecr-public';
|
||||
import {NodeHttpHandler} from '@aws-sdk/node-http-handler';
|
||||
import ProxyAgent from 'proxy-agent';
|
||||
import {HttpProxyAgent} from 'http-proxy-agent';
|
||||
import {HttpsProxyAgent} from 'https-proxy-agent';
|
||||
|
||||
const ecrRegistryRegex = /^(([0-9]{12})\.dkr\.ecr\.(.+)\.amazonaws\.com(.cn)?)(\/([^:]+)(:.+)?)?$/;
|
||||
|
||||
|
@ -60,14 +61,14 @@ export const getRegistriesData = async (registry: string, username?: string, pas
|
|||
const httpProxy = process.env.http_proxy || process.env.HTTP_PROXY || '';
|
||||
if (httpProxy) {
|
||||
core.debug(`Using http proxy ${httpProxy}`);
|
||||
httpProxyAgent = new ProxyAgent(httpProxy);
|
||||
httpProxyAgent = new HttpProxyAgent(httpProxy);
|
||||
}
|
||||
|
||||
let httpsProxyAgent: any = null;
|
||||
const httpsProxy = process.env.https_proxy || process.env.HTTPS_PROXY || '';
|
||||
if (httpsProxy) {
|
||||
core.debug(`Using https proxy ${httpsProxy}`);
|
||||
httpsProxyAgent = new ProxyAgent(httpsProxy);
|
||||
httpsProxyAgent = new HttpsProxyAgent(httpsProxy);
|
||||
}
|
||||
|
||||
const credentials =
|
||||
|
|
|
@ -9,7 +9,7 @@ export async function run(): Promise<void> {
|
|||
stateHelper.setRegistry(input.registry);
|
||||
stateHelper.setLogout(input.logout);
|
||||
await docker.login(input.registry, input.username, input.password, input.ecr);
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue