1
0
Fork 0
mirror of https://github.com/docker/login-action.git synced 2025-03-31 12:10:05 +02:00
login-action/src/context.ts

26 lines
696 B
TypeScript
Raw Normal View History

2020-08-20 16:40:33 +02:00
import * as core from '@actions/core';
export interface Inputs {
registry: string;
username: string;
password: string;
ecr: string;
logout: boolean;
httpCodesToRetry: string[];
maxAttempts: number;
retryTimeout: number;
2020-08-20 16:40:33 +02:00
}
export function getInputs(): Inputs {
2020-08-20 16:40:33 +02:00
return {
registry: core.getInput('registry'),
username: core.getInput('username'),
password: core.getInput('password'),
ecr: core.getInput('ecr'),
logout: core.getBooleanInput('logout'),
httpCodesToRetry: core.getInput('http-codes-to-retry').split(','),
maxAttempts: Number.parseInt(core.getInput('max-attempts')),
retryTimeout: Number.parseInt(core.getInput('retry-timeout'))
2020-08-20 16:40:33 +02:00
};
}