chore: Update dist

This commit is contained in:
GitHub Actions
2025-09-11 20:33:40 +00:00
committed by kellertk
parent a87e741eba
commit 177dade8f5

14
dist/index.js generated vendored
View File

@@ -698,6 +698,15 @@ async function run() {
.map((s) => s.trim()); .map((s) => s.trim());
const forceSkipOidc = (0, helpers_1.getBooleanInput)('force-skip-oidc', { required: false }); const forceSkipOidc = (0, helpers_1.getBooleanInput)('force-skip-oidc', { required: false });
const noProxy = core.getInput('no-proxy', { 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) { 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"); 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); const validCredentials = await (0, helpers_1.areCredentialsValid)(credentialsClient);
if (validCredentials) { if (validCredentials) {
core.notice('Pre-existing credentials are valid. No need to generate new ones.'); core.notice('Pre-existing credentials are valid. No need to generate new ones.');
if (timeoutId)
clearTimeout(timeoutId);
return; return;
} }
core.notice('No valid credentials exist. Running as normal.'); core.notice('No valid credentials exist. Running as normal.');
@@ -826,6 +837,9 @@ async function run() {
else { else {
core.info('Proceeding with IAM user credentials'); core.info('Proceeding with IAM user credentials');
} }
// Clear timeout on successful completion
if (timeoutId)
clearTimeout(timeoutId);
} }
catch (error) { catch (error) {
core.setFailed((0, helpers_1.errorMessage)(error)); core.setFailed((0, helpers_1.errorMessage)(error));