project_id
: _(Optional)_ ID of the Google Cloud project in which to deploy the service. The default
+- project_id
: _(Optional)_ ID of the Google Cloud project in which to deploy the service. The default
value is computed from the environment.
-- region
: _(Optional, default: `us-central1`)_ Region in which the function should be deployed.
+- region
: _(Optional, default: `us-central1`)_ Region in which the function should be deployed.
-- universe
: _(Optional, default: `googleapis.com`)_ The Google Cloud universe to use for constructing API endpoints. Trusted
+- universe
: _(Optional, default: `googleapis.com`)_ The Google Cloud universe to use for constructing API endpoints. Trusted
Partner Cloud and Google Distributed Hosted Cloud should set this to their
universe address.
@@ -88,19 +88,19 @@ jobs:
For more information about universes, see the Google Cloud documentation.
-- name
: _(Required)_ Name of the Cloud Function.
+- name
: _(Required)_ Name of the Cloud Function.
-- description
: _(Optional)_ Human-friendly description of the Cloud Function.
+- description
: _(Optional)_ Human-friendly description of the Cloud Function.
-- environment
: _(Optional, default: `GEN_2`)_ Runtime environment for the Cloud Function. Allowed values are "GEN_1" and
+- environment
: _(Optional, default: `GEN_2`)_ Runtime environment for the Cloud Function. Allowed values are "GEN_1" and
"GEN_2", but this GitHub Action only provides support for "GEN_2".
-- kms_key_name
: _(Optional)_ Resource name of a Google Cloud KMS crypto key used to encrypt/decrypt
+- kms_key_name
: _(Optional)_ Resource name of a Google Cloud KMS crypto key used to encrypt/decrypt
function resources. If specified, you must also provide an artifact
registry repository using the 'docker_repository' field that was created
with the same key.
-- labels
: _(Optional)_ List of labels that should be set on the function. These are
+- labels
: _(Optional)_ List of labels that should be set on the function. These are
comma-separated or newline-separated `KEY=VALUE`. Keys or values that
contain separators must be escaped with a backslash (e.g. `\,` or `\\n`)
unless quoted. Any leading or trailing whitespace is trimmed unless values
@@ -119,7 +119,7 @@ jobs:
Google Cloud restricts the allowed values and length for labels. Please
see the Google Cloud documentation for labels for more information.
-- source_dir
: _(Optional, default: `./`)_ Path on disk to the root of the the function's source code. Defaults to
+- source_dir
: _(Optional, default: `./`)_ Path on disk to the root of the the function's source code. Defaults to
current directory. This does NOT follow symlinks to directories or files
when generating the upload artifact.
@@ -127,14 +127,14 @@ jobs:
filesystem. This means you must have `use: actions/checkout@v4` before the
deployment step!.
-- runtime
: _(Required)_ Runtime for the function, such as "nodejs20". For a list of all available
+- runtime
: _(Required)_ Runtime for the function, such as "nodejs20". For a list of all available
runtimes, run:
$ gcloud functions runtimes list
The available runtimes change over time.
-- build_environment_variables
: _(Optional)_ List of environment variables that should be set in the build environment.
+- build_environment_variables
: _(Optional)_ List of environment variables that should be set in the build environment.
These are comma-separated or newline-separated `KEY=VALUE`. Keys or values
that contain separators must be escaped with a backslash (e.g. `\,` or
`\\n`) unless quoted. Any leading or trailing whitespace is trimmed unless
@@ -155,9 +155,9 @@ jobs:
community action or script to read the file in a separate step and import
the contents as an output.
-- build_service_account
: _(Optional)_ Service account to be used for building the container.
+- build_service_account
: _(Optional)_ Service account to be used for building the container.
-- build_worker_pool
: _(Optional)_ Name of the Cloud Build Custom Worker Pool that should be used to build
+- build_worker_pool
: _(Optional)_ Name of the Cloud Build Custom Worker Pool that should be used to build
the function. The format of this field is:
projects/docker_repository
: _(Optional)_ Repository in Artifact Registry to which the function docker image will be
+- docker_repository
: _(Optional)_ Repository in Artifact Registry to which the function docker image will be
pushed after it is built by Cloud Build. If unspecified, Cloud Functions
will create and use a repository named 'gcf-artifacts' for every deployed
region.
@@ -182,22 +182,22 @@ jobs:
Cross-project repositories are not supported. Cross-location repositories
are not supported. Repository format must be 'DOCKER'.
-- entry_point
: _(Optional)_ Name of a Google Cloud Function (as defined in source code) that will be
+- entry_point
: _(Optional)_ Name of a Google Cloud Function (as defined in source code) that will be
executed. Defaults to the resource name suffix (ID of the function), if
not specified.
-- all_traffic_on_latest_revision
: _(Optional, default: `true`)_ If true, the latest function revision will be served all traffic.
+- all_traffic_on_latest_revision
: _(Optional, default: `true`)_ If true, the latest function revision will be served all traffic.
-- cpu
: _(Optional)_ The number of available CPUs to set (e.g. 0.5, 2, 2000m). By default, a
+- cpu
: _(Optional)_ The number of available CPUs to set (e.g. 0.5, 2, 2000m). By default, a
new function's available CPUs is determined based on its memory value.
-- memory
: _(Optional)_ The amount of memory available for the function to use. Allowed values are
+- memory
: _(Optional)_ The amount of memory available for the function to use. Allowed values are
of the format: environment_variables
: _(Optional)_ List of environment variables that should be set in the runtime
+- environment_variables
: _(Optional)_ List of environment variables that should be set in the runtime
environment. These are comma-separated or newline-separated `KEY=VALUE`.
Keys or values that contain separators must be escaped with a backslash
(e.g. `\,` or `\\n`) unless quoted. Any leading or trailing whitespace is
@@ -218,20 +218,20 @@ jobs:
community action or script to read the file in a separate step and import
the contents as an output.
-- ingress_settings
: _(Optional, default: `ALLOW_ALL`)_ Ingress settings controls what traffic can reach the function. Valid
+- ingress_settings
: _(Optional, default: `ALLOW_ALL`)_ Ingress settings controls what traffic can reach the function. Valid
values are "ALLOW_ALL", "ALLOW_INTERNAL_ONLY", and
"ALLOW_INTERNAL_AND_GCLB".
-- max_instance_count
: _(Optional)_ Sets the maximum number of instances for the function. A function
+- max_instance_count
: _(Optional)_ Sets the maximum number of instances for the function. A function
execution that would exceed max-instances times out.
-- max_instance_request_concurrency
: _(Optional)_ Sets the maximum number of concurrent requests allowed per container
+- max_instance_request_concurrency
: _(Optional)_ Sets the maximum number of concurrent requests allowed per container
instance.
-- min_instance_count
: _(Optional)_ Sets the minimum number of instances for the function. This is helpful for
+- min_instance_count
: _(Optional)_ Sets the minimum number of instances for the function. This is helpful for
reducing cold start times.
-- secrets
: _(Optional)_ List of KEY=VALUE pairs to use as secrets. These are comma-separated or
+- secrets
: _(Optional)_ List of KEY=VALUE pairs to use as secrets. These are comma-separated or
newline-separated `KEY=VALUE`. Keys or values that contain separators must
be escaped with a backslash (e.g. `\,` or `\\n`) unless quoted. Any
leading or trailing whitespace is trimmed unless values are quoted.
@@ -245,17 +245,17 @@ jobs:
with:
secrets: |-
# As an environment variable:
- KEY1=secret-key-1:latest
+ KEY1=projects/my-project/secrets/my-secret/versions/latest
# As a volume mount:
- /secrets/api/key=secret-key-2:latest
+ /secrets/api/key=projects/my-project/secrets/my-secret/versions/123
```
This value will only be set if the input is a non-empty value. If a
non-empty value is given, the field values will be overwritten (not
merged). To remove all values, set the value to the literal string `{}`.
-- service_account
: _(Optional)_ The email address of the IAM service account associated with the Cloud Run
+- service_account
: _(Optional)_ The email address of the IAM service account associated with the Cloud Run
service for the function. The service account represents the identity of
the running function, and determines what permissions the function has. If
not provided, the function will use the project's default service account
@@ -268,19 +268,19 @@ jobs:
account "roles/iam.serviceAccountUser" permission on the runtime service
account.
-- service_timeout
: _(Optional, default: `60s`)_ The function execution timeout, specified as a time duration (e.g. "30s"
+- service_timeout
: _(Optional, default: `60s`)_ The function execution timeout, specified as a time duration (e.g. "30s"
for 30 seconds).
-- vpc_connector
: _(Optional)_ ID of the connector or fully qualified identifier for the connector.
+- vpc_connector
: _(Optional)_ ID of the connector or fully qualified identifier for the connector.
-- vpc_connector_egress_settings
: _(Optional, default: `PRIVATE_RANGES_ONLY`)_ Egress settings controls what traffic is diverted through the VPC Access
+- vpc_connector_egress_settings
: _(Optional, default: `PRIVATE_RANGES_ONLY`)_ Egress settings controls what traffic is diverted through the VPC Access
Connector resource. Allowed values are "PRIVATE_RANGES_ONLY" and
"ALL_TRAFFIC".
-- event_trigger_location
: _(Optional)_ The location of the trigger, which must be a region or multi-region where
+- event_trigger_location
: _(Optional)_ The location of the trigger, which must be a region or multi-region where
the relevant events originate.
-- event_trigger_type
: _(Optional)_ Specifies which action should trigger the function. For a list of
+- event_trigger_type
: _(Optional)_ Specifies which action should trigger the function. For a list of
acceptable values, run:
$ gcloud functions event-types list
@@ -291,7 +291,7 @@ jobs:
The available trigger types may change over time.
-- event_trigger_filters
: _(Optional)_ List of event filters that the trigger should monitor. An event that
+- event_trigger_filters
: _(Optional)_ List of event filters that the trigger should monitor. An event that
matches all the filteres will trigger calls to the function. These are
comma-separated or newline-separated `ATTRIBUTE=VALUE`. Attributes or
values that contain separators must be escaped with a backslash (e.g. `\,`
@@ -315,7 +315,7 @@ jobs:
[Eventarc Path
Patterns](https://cloud.google.com/eventarc/docs/path-patterns).
-- event_trigger_pubsub_topic
: _(Optional)_ Name of Google Cloud Pub/Sub topic. Every message published in this topic
+- event_trigger_pubsub_topic
: _(Optional)_ Name of Google Cloud Pub/Sub topic. Every message published in this topic
will trigger function execution with message contents passed as input
data of the format:
@@ -323,13 +323,13 @@ jobs:
The service account must have permissions on this topic.
-- event_trigger_service_account
: _(Optional)_ The email address of the IAM service account associated with the Eventarc
+- event_trigger_service_account
: _(Optional)_ The email address of the IAM service account associated with the Eventarc
trigger for the function. This is used for authenticated invocation.
-- event_trigger_retry
: _(Optional, default: `true`)_ Describes whether event triggers should retry in case of function's
+- event_trigger_retry
: _(Optional, default: `true`)_ Describes whether event triggers should retry in case of function's
execution failure.
-- event_trigger_channel
: _(Optional)_ The name of the channel associated with the trigger in the format:
+- event_trigger_channel
: _(Optional)_ The name of the channel associated with the trigger in the format:
projects/name
: Full resource name of the Cloud Function, of the format:
projects/url
: The URL of your Cloud Function.
diff --git a/action.yml b/action.yml
index 9b131c9..c4f5de0 100644
--- a/action.yml
+++ b/action.yml
@@ -215,7 +215,7 @@ inputs:
description: |-
The amount of memory available for the function to use. Allowed values are
of the format: ${e}
: _(${r}${s})_ ${n}\n`)}const l=t.indexOf("\x3c!-- BEGIN_AUTOGEN_INPUTS --\x3e");const u=t.indexOf("\x3c!-- END_AUTOGEN_INPUTS --\x3e");t.splice(l+1,u-l-1,"",...A,"");const h=Object.entries(n.outputs||{});if(h.length===0)console.warn(`action.yml outputs are empty`);const g=[];for(const[e,t]of h){const r=(t?.description||"").split("\n").map((e=>e.trim()===""?"":` ${e}`)).join("\n").trim();if(r===""){throw new Error(`Output "${e}" is missing a description`)}g.push(`- ${e}
: ${r}\n`)}const p=t.indexOf("\x3c!-- BEGIN_AUTOGEN_OUTPUTS --\x3e");const C=t.indexOf("\x3c!-- END_AUTOGEN_OUTPUTS --\x3e");t.splice(p+1,C-p-1,"",...g,"");await(0,a.writeFile)("README.md",t.join("\n"),"utf8")}},9081:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseCredential=parseCredential;t.isServiceAccountKey=isServiceAccountKey;t.isExternalAccount=isExternalAccount;const n=r(3916);const s=r(6266);function parseCredential(e){e=(e||"").trim();if(!e){throw new Error(`Missing service account key JSON (got empty value)`)}if(!e.startsWith("{")){e=(0,s.fromBase64)(e)}try{const t=JSON.parse(e);return t}catch(e){const t=(0,n.errorMessage)(e);throw new SyntaxError(`Failed to parse service account key JSON credentials: ${t}`)}}function isServiceAccountKey(e){return e.type==="service_account"}function isExternalAccount(e){return e.type!=="external_account"}t["default"]={parseCredential:parseCredential,isServiceAccountKey:isServiceAccountKey,isExternalAccount:isExternalAccount}},3214:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A{e.exports=class FixedFIFO{constructor(e){if(!(e>0)||(e-1&e)!==0)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e);this.mask=e-1;this.top=0;this.btm=0;this.next=null}clear(){this.top=this.btm=0;this.next=null;this.buffer.fill(undefined)}push(e){if(this.buffer[this.top]!==undefined)return false;this.buffer[this.top]=e;this.top=this.top+1&this.mask;return true}shift(){const e=this.buffer[this.btm];if(e===undefined)return undefined;this.buffer[this.btm]=undefined;this.btm=this.btm+1&this.mask;return e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===undefined}}},3867:(e,t,r)=>{const i=r(3587);e.exports=class FastFIFO{constructor(e){this.hwm=e||16;this.head=new i(this.hwm);this.tail=this.head;this.length=0}clear(){this.head=this.tail;this.head.clear();this.length=0}push(e){this.length++;if(!this.head.push(e)){const t=this.head;this.head=t.next=new i(2*this.head.buffer.length);this.head.push(e)}}shift(){if(this.length!==0)this.length--;const e=this.tail.shift();if(e===undefined&&this.tail.next){const e=this.tail.next;this.tail.next=null;this.tail=e;return this.tail.shift()}return e}peek(){const e=this.tail.peek();if(e===undefined&&this.tail.next)return this.tail.next.peek();return e}isEmpty(){return this.length===0}}},7506:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var n;Object.defineProperty(t,"__esModule",{value:true});t.GaxiosError=t.GAXIOS_ERROR_SYMBOL=void 0;t.defaultErrorRedactor=defaultErrorRedactor;const s=r(7016);const a=r(3155);const o=i(r(3860));t.GAXIOS_ERROR_SYMBOL=Symbol.for(`${a.pkg.name}-gaxios-error`);class GaxiosError extends Error{static[(n=t.GAXIOS_ERROR_SYMBOL,Symbol.hasInstance)](e){if(e&&typeof e==="object"&&t.GAXIOS_ERROR_SYMBOL in e&&e[t.GAXIOS_ERROR_SYMBOL]===a.pkg.version){return true}return Function.prototype[Symbol.hasInstance].call(GaxiosError,e)}constructor(e,t,r,i){var s;super(e);this.config=t;this.response=r;this.error=i;this[n]=a.pkg.version;this.config=(0,o.default)(true,{},t);if(this.response){this.response.config=(0,o.default)(true,{},this.response.config)}if(this.response){try{this.response.data=translateData(this.config.responseType,(s=this.response)===null||s===void 0?void 0:s.data)}catch(e){}this.status=this.response.status}if(i&&"code"in i&&i.code){this.code=i.code}if(t.errorRedactor){t.errorRedactor({config:this.config,response:this.response})}}}t.GaxiosError=GaxiosError;function translateData(e,t){switch(e){case"stream":return t;case"json":return JSON.parse(JSON.stringify(t));case"arraybuffer":return JSON.parse(Buffer.from(t).toString("utf8"));case"blob":return JSON.parse(t.text());default:return t}}function defaultErrorRedactor(e){const t="<