mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-03-12 18:07:10 -04:00
chore: Update dist
This commit is contained in:
14
dist/index.js
generated
vendored
14
dist/index.js
generated
vendored
@@ -698,6 +698,15 @@ async function run() {
|
||||
.map((s) => s.trim());
|
||||
const forceSkipOidc = (0, helpers_1.getBooleanInput)('force-skip-oidc', { required: false });
|
||||
const noProxy = core.getInput('no-proxy', { required: false });
|
||||
const globalTimeout = Number.parseInt(core.getInput('action-timeout-s', { required: false })) || 0;
|
||||
let timeoutId;
|
||||
if (globalTimeout > 0) {
|
||||
core.info(`Setting a global timeout of ${globalTimeout} seconds for the action`);
|
||||
timeoutId = setTimeout(() => {
|
||||
core.setFailed(`Action timed out after ${globalTimeout} seconds`);
|
||||
process.exit(1);
|
||||
}, globalTimeout * 1000);
|
||||
}
|
||||
if (forceSkipOidc && roleToAssume && !AccessKeyId && !webIdentityTokenFile) {
|
||||
throw new Error("If 'force-skip-oidc' is true and 'role-to-assume' is set, 'aws-access-key-id' or 'web-identity-token-file' must be set");
|
||||
}
|
||||
@@ -752,6 +761,8 @@ async function run() {
|
||||
const validCredentials = await (0, helpers_1.areCredentialsValid)(credentialsClient);
|
||||
if (validCredentials) {
|
||||
core.notice('Pre-existing credentials are valid. No need to generate new ones.');
|
||||
if (timeoutId)
|
||||
clearTimeout(timeoutId);
|
||||
return;
|
||||
}
|
||||
core.notice('No valid credentials exist. Running as normal.');
|
||||
@@ -826,6 +837,9 @@ async function run() {
|
||||
else {
|
||||
core.info('Proceeding with IAM user credentials');
|
||||
}
|
||||
// Clear timeout on successful completion
|
||||
if (timeoutId)
|
||||
clearTimeout(timeoutId);
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed((0, helpers_1.errorMessage)(error));
|
||||
|
||||
Reference in New Issue
Block a user