File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,12 @@ async function assumeRole(params) {
57
57
58
58
const roleSessionTags = roleSkipSessionTagging ? undefined : tagArray ;
59
59
60
+ if ( roleSessionTags == undefined ) {
61
+ core . debug ( "Role session tagging has been skipped." )
62
+ } else {
63
+ core . debug ( roleSessionTags . length + " role session tags are being used." )
64
+ }
65
+
60
66
const assumeRoleRequest = {
61
67
RoleArn : roleArn ,
62
68
RoleSessionName : roleSessionName ,
@@ -203,8 +209,9 @@ async function run() {
203
209
const roleExternalId = core . getInput ( 'role-external-id' , { required : false } ) ;
204
210
const roleDurationSeconds = core . getInput ( 'role-duration-seconds' , { required : false } ) || MAX_ACTION_RUNTIME ;
205
211
const roleSessionName = core . getInput ( 'role-session-name' , { required : false } ) || ROLE_SESSION_NAME ;
206
- const roleSkipSessionTagging = core . getInput ( 'role-skip-session-tagging' , { required : false } ) ;
207
-
212
+ const roleSkipSessionTaggingInput = core . getInput ( 'role-skip-session-tagging' , { required : false } ) || 'false' ;
213
+ const roleSkipSessionTagging = roleSkipSessionTaggingInput . toLowerCase ( ) === 'true' ;
214
+
208
215
if ( ! region . match ( REGION_REGEX ) ) {
209
216
throw new Error ( `Region is not valid: ${ region } ` ) ;
210
217
}
Original file line number Diff line number Diff line change @@ -559,7 +559,7 @@ describe('Configure AWS Credentials', () => {
559
559
test ( 'skip tagging provided as true' , async ( ) => {
560
560
core . getInput = jest
561
561
. fn ( )
562
- . mockImplementation ( mockGetInput ( { ...ASSUME_ROLE_INPUTS , 'role-skip-session-tagging' : true } ) ) ;
562
+ . mockImplementation ( mockGetInput ( { ...ASSUME_ROLE_INPUTS , 'role-skip-session-tagging' : ' true' } ) ) ;
563
563
564
564
await run ( ) ;
565
565
expect ( mockStsAssumeRole ) . toHaveBeenCalledWith ( {
@@ -573,7 +573,7 @@ describe('Configure AWS Credentials', () => {
573
573
test ( 'skip tagging provided as false' , async ( ) => {
574
574
core . getInput = jest
575
575
. fn ( )
576
- . mockImplementation ( mockGetInput ( { ...ASSUME_ROLE_INPUTS , 'role-skip-session-tagging' : false } ) ) ;
576
+ . mockImplementation ( mockGetInput ( { ...ASSUME_ROLE_INPUTS , 'role-skip-session-tagging' : ' false' } ) ) ;
577
577
578
578
await run ( ) ;
579
579
expect ( mockStsAssumeRole ) . toHaveBeenCalledWith ( {
You can’t perform that action at this time.
0 commit comments