mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-06-05 21:17:05 +00:00
chore: Update dist
This commit is contained in:
parent
3d568d2c43
commit
5ce6d03987
1 changed files with 5 additions and 0 deletions
5
dist/index.js
vendored
5
dist/index.js
vendored
|
|
@ -137,6 +137,7 @@ const USER_AGENT = 'configure-aws-credentials-for-github-actions';
|
|||
const MAX_TAG_VALUE_LENGTH = 256;
|
||||
const SANITIZATION_CHARACTER = '_';
|
||||
const ROLE_SESSION_NAME = 'GitHubActions';
|
||||
const REGION_REGEX = /^[a-z0-9-]+$/g;
|
||||
|
||||
async function assumeRole(params) {
|
||||
// Assume a role to get short-lived credentials using longer-lived credentials.
|
||||
|
|
@ -278,6 +279,10 @@ async function run() {
|
|||
const roleDurationSeconds = core.getInput('role-duration-seconds', {required: false}) || MAX_ACTION_RUNTIME;
|
||||
const roleSessionName = core.getInput('role-session-name', { required: false }) || ROLE_SESSION_NAME;
|
||||
|
||||
if (!region.match(REGION_REGEX)) {
|
||||
throw new Error(`Region is not valid: ${region}`);
|
||||
}
|
||||
|
||||
exportRegion(region);
|
||||
|
||||
// Always export the source credentials and account ID.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue