Skip to content

Commit

Permalink
Add support for environment variables (#294)
Browse files Browse the repository at this point in the history
- Closes #232
- Fixes #24
  • Loading branch information
sethvargo authored Mar 9, 2023
1 parent 02f7eed commit 8d32c8e
Show file tree
Hide file tree
Showing 8 changed files with 407 additions and 203 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ jobs:
uses: './'
with:
working_directory: '${{ github.workspace }}/example-app'
build_env_vars: |-
FOO=bar
ZIP=zap
env_vars: |-
FOO=bar
ZIP=zap
- name: 'Verify deployment'
run: |-
Expand Down
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,34 @@ jobs:
the additional deliverables may require additional roles for your service
account user.

- `build_env_vars`: (Optional) List of key=value pairs to set as environment
variables during tbe build process. This will overwrite any duplicate key
environment variables defined in the app.yaml.

```yaml
with:
build_env_vars: |-
FOO=bar
ZIP=zap
```

Note: To include environment variables defined in another file, use the
[`includes` directive][includes-directive] in your app.yaml.

- `env_vars`: (Optional) List of key=value pairs to set as environment
variables. This will overwrite any duplicate key environment variables
defined in the app.yaml.

```yaml
with:
env_vars: |-
FOO=bar
ZIP=zap
```

Note: To include environment variables defined in another file, use the
[`includes` directive][includes-directive] in your app.yaml.

- `image_url`: (Optional) Deploy with a specific container image. The image
url must be from one of the valid GCR hostnames (example, `gcr.io/`).

Expand Down Expand Up @@ -200,3 +228,4 @@ jobs:
[create-key]: https://cloud.google.com/iam/docs/creating-managing-service-account-keys
[app-engine-admin-api]: https://console.cloud.google.com/apis/api/appengine.googleapis.com/overview
[app-engine-nodejs-docs]: https://cloud.google.com/appengine/docs/standard/nodejs/console#console
[includes-directive]: https://cloud.google.com/appengine/docs/legacy/standard/python/config/appref#includes
13 changes: 13 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ inputs:
files (such as app.yaml) in the current directory.
required: false

build_env_vars:
description: |-
List of key=value pairs to set as environment variables during tbe build
process. This will overwrite any duplicate key environment variables
defined in the app.yaml.
required: false

env_vars:
description: |-
List of key=value pairs to set as environment variables. This will
overwrite any duplicate key environment variables defined in the app.yaml.
required: false

image_url:
description: |-
Deploy with a specific container image. The image URL must be from one of
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit 8d32c8e

Please sign in to comment.