diff --git a/dist/index.js b/dist/index.js index 0290e6a..1eee5fa 100644 --- a/dist/index.js +++ b/dist/index.js @@ -366233,23 +366233,28 @@ class CloudFunction { ? opts.serviceAccountEmail : null; request.vpcConnector = (opts === null || opts === void 0 ? void 0 : opts.vpcConnector) ? opts.vpcConnector : null; + request.vpcConnectorEgressSettings = (opts === null || opts === void 0 ? void 0 : opts.vpcConnectorEgressSettings) + ? opts.vpcConnectorEgressSettings + : null; + request.ingressSettings = (opts === null || opts === void 0 ? void 0 : opts.ingressSettings) + ? opts.ingressSettings + : null; request.timeout = (opts === null || opts === void 0 ? void 0 : opts.timeout) ? `${opts.timeout}s` : null; request.maxInstances = (opts === null || opts === void 0 ? void 0 : opts.maxInstances) ? opts.maxInstances : null; request.availableMemoryMb = (opts === null || opts === void 0 ? void 0 : opts.availableMemoryMb) ? opts.availableMemoryMb : null; - // Only one of envVars and envVarsFile should be set - if ((opts === null || opts === void 0 ? void 0 : opts.envVars) && (opts === null || opts === void 0 ? void 0 : opts.envVarsFile)) { - throw new Error('Only one of env_vars or env_vars_file can be specified.'); - } - // Parse env vars - let envVars; - if (opts === null || opts === void 0 ? void 0 : opts.envVars) { - envVars = this.parseKVPairs(opts.envVars); - request.environmentVariables = envVars; - } - if (opts === null || opts === void 0 ? void 0 : opts.envVarsFile) { - envVars = this.parseEnvVarsFile(opts.envVarsFile); + // Check if `envVars` or `envVarsFile` are set. + // If two var keys are the same between `envVars` and `envVarsFile` + // `envVars` will override the one on `envVarsFile` + if ((opts === null || opts === void 0 ? void 0 : opts.envVars) || (opts === null || opts === void 0 ? void 0 : opts.envVarsFile)) { + let envVars; + if (opts === null || opts === void 0 ? void 0 : opts.envVarsFile) { + envVars = this.parseEnvVarsFile(opts.envVarsFile); + } + if (opts === null || opts === void 0 ? void 0 : opts.envVars) { + envVars = Object.assign(Object.assign({}, envVars), this.parseKVPairs(opts.envVars)); + } request.environmentVariables = envVars; } if (opts === null || opts === void 0 ? void 0 : opts.labels) { @@ -366541,6 +366546,8 @@ class CloudFunctionClient { 'entryPoint', 'runtime', 'vpcConnector', + 'vpcConnectorEgressSettings', + 'ingressSettings', 'serviceAccountEmail', 'timeout', 'maxInstances', @@ -366715,6 +366722,8 @@ function run() { const entryPoint = core.getInput('entry_point'); const sourceDir = core.getInput('source_dir'); const vpcConnector = core.getInput('vpc_connector'); + const vpcConnectorEgressSettings = core.getInput('vpc_connector_egress_settings'); + const ingressSettings = core.getInput('ingress_settings'); const serviceAccountEmail = core.getInput('service_account_email'); const timeout = core.getInput('timeout'); const maxInstances = core.getInput('max_instances'); @@ -366742,6 +366751,8 @@ function run() { eventTriggerService, deployTimeout, vpcConnector, + vpcConnectorEgressSettings, + ingressSettings, serviceAccountEmail, labels, });