File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ inputs:
56
56
description : |-
57
57
If true, the action will securely generate a credentials file which can be
58
58
used for authentication via gcloud and Google Cloud SDKs.
59
- default : true
59
+ default : ' true'
60
60
required : false
61
61
export_environment_variables :
62
62
description : |-
@@ -79,7 +79,7 @@ inputs:
79
79
If false, the action will not export any environment variables, meaning
80
80
future steps are unlikely to be automatically authenticated to Google
81
81
Cloud.
82
- default : true
82
+ default : ' true'
83
83
required : false
84
84
token_format :
85
85
description : |-
@@ -113,7 +113,7 @@ inputs:
113
113
If true, the action will remove any created credentials from the
114
114
filesystem upon completion. This only applies if "create_credentials_file"
115
115
is true.
116
- default : true
116
+ default : ' true'
117
117
required : false
118
118
119
119
# access token params
@@ -175,7 +175,7 @@ inputs:
175
175
generated token. If true, the token will contain "email" and
176
176
"email_verified" claims. This is only valid when "token_format" is
177
177
"id_token".
178
- default : false
178
+ default : ' false'
179
179
required : false
180
180
181
181
outputs :
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import { join as pathjoin } from 'path';
16
16
17
17
import {
18
18
exportVariable ,
19
- getBooleanInput ,
20
19
getIDToken ,
21
20
getInput ,
22
21
setFailed ,
@@ -29,6 +28,7 @@ import {
29
28
isEmptyDir ,
30
29
isPinnedToHead ,
31
30
parseMultilineCSV ,
31
+ parseBoolean ,
32
32
parseDuration ,
33
33
pinnedToHeadWarning ,
34
34
} from '@google-github-actions/actions-utils' ;
@@ -79,8 +79,8 @@ export async function run(logger: Logger) {
79
79
const oidcTokenAudience =
80
80
getInput ( `audience` ) || `https://iam.googleapis.com/${ workloadIdentityProvider } ` ;
81
81
const credentialsJSON = getInput ( `credentials_json` ) ;
82
- const createCredentialsFile = getBooleanInput ( `create_credentials_file` ) ;
83
- const exportEnvironmentVariables = getBooleanInput ( `export_environment_variables` ) ;
82
+ const createCredentialsFile = parseBoolean ( getInput ( `create_credentials_file` ) ) ;
83
+ const exportEnvironmentVariables = parseBoolean ( getInput ( `export_environment_variables` ) ) ;
84
84
const tokenFormat = getInput ( `token_format` ) ;
85
85
const delegates = parseMultilineCSV ( getInput ( `delegates` ) ) ;
86
86
const universe = getInput ( `universe` ) ;
@@ -301,7 +301,7 @@ export async function run(logger: Logger) {
301
301
logger . debug ( `Creating id token` ) ;
302
302
303
303
const idTokenAudience = getInput ( 'id_token_audience' , { required : true } ) ;
304
- const idTokenIncludeEmail = getBooleanInput ( 'id_token_include_email' ) ;
304
+ const idTokenIncludeEmail = parseBoolean ( getInput ( 'id_token_include_email' ) ) ;
305
305
306
306
// Ensure a service_account was provided if using WIF.
307
307
if ( ! serviceAccount ) {
Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- import { getBooleanInput , setFailed } from '@actions/core' ;
15
+ import { getInput , setFailed } from '@actions/core' ;
16
16
17
- import { errorMessage , forceRemove } from '@google-github-actions/actions-utils' ;
17
+ import { errorMessage , forceRemove , parseBoolean } from '@google-github-actions/actions-utils' ;
18
18
19
19
import { Logger } from './logger' ;
20
20
21
21
export async function run ( logger : Logger ) {
22
22
try {
23
- const createCredentials = getBooleanInput ( 'create_credentials_file' ) ;
23
+ const createCredentials = parseBoolean ( getInput ( 'create_credentials_file' ) ) ;
24
24
if ( ! createCredentials ) {
25
25
logger . info ( `Skipping credential cleanup - "create_credentials_file" is false.` ) ;
26
26
return ;
27
27
}
28
28
29
- const cleanupCredentials = getBooleanInput ( 'cleanup_credentials' ) ;
29
+ const cleanupCredentials = parseBoolean ( getInput ( 'cleanup_credentials' ) ) ;
30
30
if ( ! cleanupCredentials ) {
31
31
logger . info ( `Skipping credential cleanup - "cleanup_credentials" is false.` ) ;
32
32
return ;
You can’t perform that action at this time.
0 commit comments