Skip to content

Commit 0d46d76

Browse files
committed
Fix docsgen and remove deprecated field
1 parent 5d1147c commit 0d46d76

File tree

4 files changed

+168
-119
lines changed

4 files changed

+168
-119
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
6464
- name: 'Verify deployment'
6565
run: |-
66-
curl '${{ steps.deploy.outputs.url }}' \
66+
curl '${{ steps.deploy.outputs.version_url }}' \
6767
--silent \
6868
--fail \
6969
--location \

README.md

Lines changed: 66 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -46,77 +46,66 @@ jobs:
4646
4747
## Inputs
4848
49-
- `project_id`: (Optional) ID of the Google Cloud project. If not provided,
50-
this is inherited from the environment.
51-
52-
- `working_directory`: (Optional) The working directory to use. **Actions do
53-
not honor [default working-directory
54-
settings](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun).**
55-
The `deliverables` input is a relative path based on this setting.
56-
57-
- `deliverables`: (Optional) The [yaml
58-
files](https://cloud.google.com/appengine/docs/standard/nodejs/configuration-files#optional_configuration_files)
59-
for the services or configurations you want to deploy. If not given,
60-
defaults to app.yaml in the current directory. If that is not found,
61-
attempts to automatically generate necessary configuration files (such as
62-
app.yaml) in the current directory (example, `app.yaml cron.yaml`). Note:
63-
the additional deliverables may require additional roles for your service
64-
account user.
65-
66-
- `build_env_vars`: (Optional) List of key=value pairs to set as environment
67-
variables during tbe build process. This will overwrite any duplicate key
68-
environment variables defined in the app.yaml.
69-
70-
```yaml
71-
with:
72-
build_env_vars: |-
73-
FOO=bar
74-
ZIP=zap
75-
```
76-
77-
Note: To include environment variables defined in another file, use the
78-
[`includes` directive][includes-directive] in your app.yaml.
79-
80-
- `env_vars`: (Optional) List of key=value pairs to set as environment
81-
variables. This will overwrite any duplicate key environment variables
82-
defined in the app.yaml.
83-
84-
```yaml
85-
with:
86-
env_vars: |-
87-
FOO=bar
88-
ZIP=zap
89-
```
90-
91-
Note: To include environment variables defined in another file, use the
92-
[`includes` directive][includes-directive] in your app.yaml.
93-
94-
- `image_url`: (Optional) Deploy with a specific container image. The image
95-
url must be from one of the valid GCR hostnames (example, `gcr.io/`).
96-
97-
- `version`: (Optional) The version of the app that will be created or
98-
replaced by this deployment. If you do not specify a version, one will be
99-
generated for you.
100-
101-
- `promote`: (Optional) Promote the deployed version to receive all traffic.
102-
The default is `true`.
103-
104-
- `flags`: (Optional) Space-separated list of other App Engine flags. This can
105-
be used to access features that are not exposed via this GitHub Action.
106-
107-
```yaml
108-
with:
109-
flags: '--ignore-file=...'
110-
```
49+
<!-- BEGIN_AUTOGEN_INPUTS -->
50+
51+
- <a name="__input_project_id"></a><a href="#user-content-__input_project_id"><code>project_id</code></a>: _(Optional)_ ID of the Google Cloud project. If not provided, this is inherited from the environment.
52+
53+
- <a name="__input_working_directory"></a><a href="#user-content-__input_working_directory"><code>working_directory</code></a>: _(Optional)_ The working directory to use. **GitHub Actions do not honor [default working-directory settings](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun).** The `deliverables` input is a relative path based on this setting.
54+
55+
- <a name="__input_deliverables"></a><a href="#user-content-__input_deliverables"><code>deliverables</code></a>: _(Optional)_ The [yaml files](https://cloud.google.com/appengine/docs/standard/nodejs/configuration-files#optional_configuration_files) for the services or configurations you want to deploy. If not given, defaults to app.yaml in the current directory. If that is not found, attempts to automatically generate necessary configuration files (such as app.yaml) in the current directory (example, `app.yaml cron.yaml`).
56+
Note: The additional deliverables may require additional roles for your service account user.
57+
58+
- <a name="__input_build_env_vars"></a><a href="#user-content-__input_build_env_vars"><code>build_env_vars</code></a>: _(Optional)_ List of build 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 values are quoted.
59+
60+
build_env_vars: |-
61+
FRUIT=apple
62+
SENTENCE=" this will retain leading and trailing spaces "
63+
64+
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 `{}`.
65+
To include build environment variables defined in another file, use the [`includes` directive][includes-directive] in your `app.yaml`.
66+
This will overwrite any duplicate key environment variables defined in the `app.yaml`.
67+
68+
- <a name="__input_env_vars"></a><a href="#user-content-__input_env_vars"><code>env_vars</code></a>: _(Optional)_ List of environment variables that should be set in the 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 values are quoted.
69+
70+
env_vars: |-
71+
FRUIT=apple
72+
SENTENCE=" this will retain leading and trailing spaces "
73+
74+
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 `{}`.
75+
To include environment variables defined in another file, use the [`includes` directive][includes-directive] in your `app.yaml`.
76+
This will overwrite any duplicate key environment variables defined in the `app.yaml`.
77+
78+
- <a name="__input_image_url"></a><a href="#user-content-__input_image_url"><code>image_url</code></a>: _(Optional)_ Fully-qualified name of the container image to deploy. For example:
79+
80+
us-docker.pkg.dev/cloudrun/container/hello:latest
81+
82+
or
83+
84+
us-docker.pkg.dev/my-project/my-container/image:1.2.3
85+
86+
- <a name="__input_version"></a><a href="#user-content-__input_version"><code>version</code></a>: _(Optional)_ The version of the app that will be created or replaced by this deployment. If you do not specify a version, one will be generated for you.
87+
88+
- <a name="__input_promote"></a><a href="#user-content-__input_promote"><code>promote</code></a>: _(Optional, default: `true`)_ Promote the deployed version to receive all traffic.
89+
90+
- <a name="__input_flags"></a><a href="#user-content-__input_flags"><code>flags</code></a>: _(Optional)_ Space separate list of additional Cloud Functions flags to pass to the deploy command. This can be used to apply advanced features that are not exposed via this GitHub Action.
91+
92+
with:
93+
flags: '--ignore-file=...'
94+
95+
Flags that include other flags must quote the _entire_ outer flag value. For example, to pass `--args=-X=123`:
96+
97+
with:
98+
flags: 'flags: '--ignore-file=...' "--args=-X=123"'
11199

112100
See the [complete list of flags](https://cloud.google.com/sdk/gcloud/reference/app/deploy#FLAGS) for more information.
101+
Please note, this GitHub Action does not parse or validate the flags. You are responsible for making sure the flags are available on the gcloud version and subcommand.
102+
103+
- <a name="__input_gcloud_version"></a><a href="#user-content-__input_gcloud_version"><code>gcloud_version</code></a>: _(Optional)_ Version of the Cloud SDK to install. If unspecified or set to "latest", the latest available gcloud SDK version for the target platform will be installed. Example: "290.0.1".
113104

114-
---
105+
- <a name="__input_gcloud_component"></a><a href="#user-content-__input_gcloud_component"><code>gcloud_component</code></a>: _(Optional)_ Version of the Cloud SDK components to install and use. If unspecified, the latest or released version will be used. This is the equivalent of running 'gcloud alpha COMMAND' or 'gcloud beta COMMAND'. Valid values are `alpha` or `beta`. The default value is to use the stable track.
115106

116-
- `gcloud_version`: (Optional) Version of the gcloud CLI to use. The default value is `latest`.
117107

118-
- `gcloud_component`: (Optional) Component of the gcloud CLI to use. Valid
119-
values are `alpha` and `beta`. The default value is to use the stable track.
108+
<!-- END_AUTOGEN_INPUTS -->
120109

121110
### app.yaml customizations
122111

@@ -126,21 +115,22 @@ for more information.
126115

127116
## Outputs
128117

129-
- `name`: The fully-qualified resource name of the deployment. This will be of
130-
the format "apps/<project>/services/<service>/versions/<version>".
118+
<!-- BEGIN_AUTOGEN_OUTPUTS -->
119+
120+
- <a name="__output_name"></a><a href="#user-content-__output_name"><code>name</code></a>: The fully-qualified resource name of the deployment. This will be of the format "apps/<project>/services/<service>/versions/<version>".
121+
122+
- <a name="__output_runtime"></a><a href="#user-content-__output_runtime"><code>runtime</code></a>: The computed deployment runtime.
123+
124+
- <a name="__output_service_account_email"></a><a href="#user-content-__output_service_account_email"><code>service_account_email</code></a>: The email address of the runtime service account.
131125

132-
- `runtime`: The computed deployment runtime.
126+
- <a name="__output_serving_status"></a><a href="#user-content-__output_serving_status"><code>serving_status</code></a>: The current serving status. The value is usually "SERVING", unless the deployment failed to start.
133127

134-
- `service_account_email`: The email address of the runtime service account.
128+
- <a name="__output_version_id"></a><a href="#user-content-__output_version_id"><code>version_id</code></a>: Unique identifier for the version, or the specified version if one was given.
135129

136-
- `serving_status`: The current serving status. The value is usually
137-
"SERVING", unless the deployment failed to start.
130+
- <a name="__output_version_url"></a><a href="#user-content-__output_version_url"><code>version_url</code></a>: URL of the version of the AppEngine service that was deployed.
138131

139-
- `version_id`: Unique identifier for the version, or the specified version if
140-
one was given.
141132

142-
- `version_url`: URL of the version of the AppEngine service that was
143-
deployed.
133+
<!-- END_AUTOGEN_OUTPUTS -->
144134

145135
## Authorization
146136

action.yml

Lines changed: 99 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,140 @@
11
name: 'Deploy to App Engine'
22
author: 'Google LLC'
3-
description: |-
3+
description: >-
44
Deploy and promote a new service to Google App Engine.
55
66
inputs:
77
project_id:
8-
description: |-
9-
The Google Cloud Project ID. If unspecified, it is inherited from the
10-
environment.
8+
description: >-
9+
ID of the Google Cloud project. If not provided, this is inherited from
10+
the environment.
1111
required: false
1212

1313
working_directory:
14-
description: |-
15-
The path to set the working directory. The deliverables will be referenced
16-
from this path.
14+
description: >-
15+
The working directory to use. **GitHub Actions do not honor [default
16+
working-directory
17+
settings](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun).**
18+
The `deliverables` input is a relative path based on this setting.
1719
required: false
1820

1921
deliverables:
20-
description: |-
21-
The yaml files for the services or configurations you want to deploy.
22-
If not given, defaults to app.yaml in the current directory. If that is
23-
not found, attempts to automatically generate necessary configuration
24-
files (such as app.yaml) in the current directory.
22+
description: >-
23+
The [yaml
24+
files](https://cloud.google.com/appengine/docs/standard/nodejs/configuration-files#optional_configuration_files)
25+
for the services or configurations you want to deploy. If not given,
26+
defaults to app.yaml in the current directory. If that is not found,
27+
attempts to automatically generate necessary configuration files (such as
28+
app.yaml) in the current directory (example, `app.yaml cron.yaml`).
29+
30+
Note: The additional deliverables may require additional roles for your
31+
service account user.
2532
required: false
2633

2734
build_env_vars:
28-
description: |-
29-
List of key=value pairs to set as environment variables during tbe build
30-
process. This will overwrite any duplicate key environment variables
31-
defined in the app.yaml.
35+
description: >-
36+
List of build environment variables that should be set in the build
37+
environment. These are comma-separated or newline-separated `KEY=VALUE`.
38+
Keys or values that contain separators must be escaped with a backslash
39+
(e.g. `\,` or `\\n`) unless quoted. Any leading or trailing whitespace is
40+
trimmed unless values are quoted.
41+
42+
build_env_vars: |-
43+
FRUIT=apple
44+
SENTENCE=" this will retain leading and trailing spaces "
45+
46+
This value will only be set if the input is a non-empty value. If a
47+
non-empty value is given, the field values will be overwritten (not
48+
merged). To remove all values, set the value to the literal string `{}`.
49+
50+
To include build environment variables defined in another file, use the
51+
[`includes` directive][includes-directive] in your `app.yaml`.
52+
53+
This will overwrite any duplicate key environment variables defined in the
54+
`app.yaml`.
3255
required: false
3356

3457
env_vars:
35-
description: |-
36-
List of key=value pairs to set as environment variables. This will
37-
overwrite any duplicate key environment variables defined in the app.yaml.
58+
description: >-
59+
List of environment variables that should be set in the environment. These
60+
are comma-separated or newline-separated `KEY=VALUE`. Keys or values that
61+
contain separators must be escaped with a backslash (e.g. `\,` or `\\n`)
62+
unless quoted. Any leading or trailing whitespace is trimmed unless values
63+
are quoted.
64+
65+
env_vars: |-
66+
FRUIT=apple
67+
SENTENCE=" this will retain leading and trailing spaces "
68+
69+
This value will only be set if the input is a non-empty value. If a
70+
non-empty value is given, the field values will be overwritten (not
71+
merged). To remove all values, set the value to the literal string `{}`.
72+
73+
To include environment variables defined in another file, use the
74+
[`includes` directive][includes-directive] in your `app.yaml`.
75+
76+
This will overwrite any duplicate key environment variables defined in the
77+
`app.yaml`.
3878
required: false
3979

4080
image_url:
41-
description: |-
42-
Deploy with a specific container image. The image URL must be from one of
43-
the valid GCR host names.
81+
description: >-
82+
Fully-qualified name
83+
of the container image to deploy. For example:
84+
85+
us-docker.pkg.dev/cloudrun/container/hello:latest
86+
87+
or
88+
89+
us-docker.pkg.dev/my-project/my-container/image:1.2.3
4490
required: false
4591

4692
version:
47-
description: |-
93+
description: >-
4894
The version of the app that will be created or replaced by this
4995
deployment. If you do not specify a version, one will be generated for
5096
you.
5197
required: false
5298

5399
promote:
54-
description: |-
100+
description: >-
55101
Promote the deployed version to receive all traffic.
56102
required: false
57103
default: 'true'
58104

59105
flags:
60-
description: |-
61-
Space separated list of other App Engine flags, examples can be found:
62-
https://cloud.google.com/sdk/gcloud/reference/app/deploy#FLAGS. Ex
63-
--service-account=my-account@project.iam.gserviceaccount.com --no-cache
106+
description: >-
107+
Space separate list of additional Cloud Functions flags to pass to the
108+
deploy command. This can be used to apply advanced features that are not
109+
exposed via this GitHub Action.
110+
111+
with:
112+
flags: '--ignore-file=...'
113+
114+
Flags that include other flags must quote the _entire_ outer flag value. For
115+
example, to pass `--args=-X=123`:
116+
117+
with:
118+
flags: 'flags: '--ignore-file=...' "--args=-X=123"'
119+
120+
See the [complete list of
121+
flags](https://cloud.google.com/sdk/gcloud/reference/app/deploy#FLAGS) for
122+
more information.
123+
124+
Please note, this GitHub Action does not parse or validate the flags. You
125+
are responsible for making sure the flags are available on the gcloud
126+
version and subcommand.
64127
required: false
65128

66129
gcloud_version:
67-
description: |-
130+
description: >-
68131
Version of the Cloud SDK to install. If unspecified or set to "latest",
69132
the latest available gcloud SDK version for the target platform will be
70133
installed. Example: "290.0.1".
71134
required: false
72135

73136
gcloud_component:
74-
description: |-
137+
description: >-
75138
Version of the Cloud SDK components to install and use. If unspecified,
76139
the latest or released version will be used. This is the equivalent of
77140
running 'gcloud alpha COMMAND' or 'gcloud beta COMMAND'. Valid values are
@@ -80,37 +143,32 @@ inputs:
80143

81144
outputs:
82145
name:
83-
description: |-
146+
description: >-
84147
The fully-qualified resource name of the deployment. This will be of the
85148
format "apps/<project>/services/<service>/versions/<version>".
86149
87150
runtime:
88-
description: |-
151+
description: >-
89152
The computed deployment runtime.
90153
91154
service_account_email:
92-
description: |-
155+
description: >-
93156
The email address of the runtime service account.
94157
95158
serving_status:
96-
description: |-
159+
description: >-
97160
The current serving status. The value is usually "SERVING", unless the
98161
deployment failed to start.
99162
100163
version_id:
101-
description: |-
164+
description: >-
102165
Unique identifier for the version, or the specified version if one was
103166
given.
104167
105168
version_url:
106-
description: |-
169+
description: >-
107170
URL of the version of the AppEngine service that was deployed.
108171
109-
url:
110-
description: |-
111-
DEPRECATED: Use "version_url" instead. URL of the version of the AppEngine
112-
service that was deployed.
113-
114172
branding:
115173
icon: 'code'
116174
color: 'blue'

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "Github Action: Deploy to Google App Engine",
55
"main": "dist/index.js",
66
"scripts": {
7-
"build": "ncc build -m src/main.ts",
7+
"build": "rm -rf dist/ && ncc build -m src/main.ts -o dist/main",
8+
"docs": "./node_modules/.bin/actions-gen-readme",
89
"lint": "eslint .",
910
"format": "eslint . --fix",
1011
"test": "node --require ts-node/register --test-reporter spec --test tests/**/*.test.ts"

0 commit comments

Comments
 (0)