Skip to content

Commit 8d32c8e

Browse files
authored
Add support for environment variables (#294)
- Closes #232 - Fixes #24
1 parent 02f7eed commit 8d32c8e

File tree

8 files changed

+407
-203
lines changed

8 files changed

+407
-203
lines changed

.github/workflows/integration.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ jobs:
4545
uses: './'
4646
with:
4747
working_directory: '${{ github.workspace }}/example-app'
48+
build_env_vars: |-
49+
FOO=bar
50+
ZIP=zap
51+
env_vars: |-
52+
FOO=bar
53+
ZIP=zap
4854
4955
- name: 'Verify deployment'
5056
run: |-

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,34 @@ jobs:
5757
the additional deliverables may require additional roles for your service
5858
account user.
5959

60+
- `build_env_vars`: (Optional) List of key=value pairs to set as environment
61+
variables during tbe build process. This will overwrite any duplicate key
62+
environment variables defined in the app.yaml.
63+
64+
```yaml
65+
with:
66+
build_env_vars: |-
67+
FOO=bar
68+
ZIP=zap
69+
```
70+
71+
Note: To include environment variables defined in another file, use the
72+
[`includes` directive][includes-directive] in your app.yaml.
73+
74+
- `env_vars`: (Optional) List of key=value pairs to set as environment
75+
variables. This will overwrite any duplicate key environment variables
76+
defined in the app.yaml.
77+
78+
```yaml
79+
with:
80+
env_vars: |-
81+
FOO=bar
82+
ZIP=zap
83+
```
84+
85+
Note: To include environment variables defined in another file, use the
86+
[`includes` directive][includes-directive] in your app.yaml.
87+
6088
- `image_url`: (Optional) Deploy with a specific container image. The image
6189
url must be from one of the valid GCR hostnames (example, `gcr.io/`).
6290

@@ -200,3 +228,4 @@ jobs:
200228
[create-key]: https://cloud.google.com/iam/docs/creating-managing-service-account-keys
201229
[app-engine-admin-api]: https://console.cloud.google.com/apis/api/appengine.googleapis.com/overview
202230
[app-engine-nodejs-docs]: https://cloud.google.com/appengine/docs/standard/nodejs/console#console
231+
[includes-directive]: https://cloud.google.com/appengine/docs/legacy/standard/python/config/appref#includes

action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ inputs:
2424
files (such as app.yaml) in the current directory.
2525
required: false
2626

27+
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.
32+
required: false
33+
34+
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.
38+
required: false
39+
2740
image_url:
2841
description: |-
2942
Deploy with a specific container image. The image URL must be from one of

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)