mirror of
https://github.com/docker/login-action.git
synced 2025-04-27 17:16:35 +02:00
dev: switch to eslint
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
56f72fcef0
commit
0828e0e718
16 changed files with 10227 additions and 32445 deletions
|
@ -34,7 +34,7 @@ export const getAccountIDs = (registry: string): string[] => {
|
|||
if (!matches) {
|
||||
return [];
|
||||
}
|
||||
let accountIDs: Array<string> = [matches[2]];
|
||||
const accountIDs: Array<string> = [matches[2]];
|
||||
if (process.env.AWS_ACCOUNT_IDS) {
|
||||
accountIDs.push(...process.env.AWS_ACCOUNT_IDS.split(','));
|
||||
}
|
||||
|
@ -57,14 +57,14 @@ export const getRegistriesData = async (registry: string, username?: string, pas
|
|||
authTokenRequest['registryIds'] = accountIDs;
|
||||
}
|
||||
|
||||
let httpProxyAgent: any = null;
|
||||
let httpProxyAgent;
|
||||
const httpProxy = process.env.http_proxy || process.env.HTTP_PROXY || '';
|
||||
if (httpProxy) {
|
||||
core.debug(`Using http proxy ${httpProxy}`);
|
||||
httpProxyAgent = new HttpProxyAgent(httpProxy);
|
||||
}
|
||||
|
||||
let httpsProxyAgent: any = null;
|
||||
let httpsProxyAgent;
|
||||
const httpsProxy = process.env.https_proxy || process.env.HTTPS_PROXY || '';
|
||||
if (httpsProxy) {
|
||||
core.debug(`Using https proxy ${httpsProxy}`);
|
||||
|
|
|
@ -27,7 +27,7 @@ export async function loginStandard(registry: string, username: string, password
|
|||
throw new Error('Username and password required');
|
||||
}
|
||||
|
||||
let loginArgs: Array<string> = ['login', '--password-stdin'];
|
||||
const loginArgs: Array<string> = ['login', '--password-stdin'];
|
||||
loginArgs.push('--username', username);
|
||||
loginArgs.push(registry);
|
||||
|
||||
|
|
|
@ -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: any) {
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue