Skip to content

Commit eb3dc19

Browse files
authored
allow users to choose node version of deployment (#21)
2 parents 9df76b3 + cd660c3 commit eb3dc19

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/deploy_node_lambda.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
description: "AWS region"
2020
default: "eu-west-1"
2121
type: string
22+
node_version:
23+
description: "The version of node to deploy with"
24+
default: 14
25+
type: number
2226
secrets:
2327
node_auth_token:
2428
description: "Auth token for using npx. Should exist in secrets"
@@ -43,7 +47,7 @@ jobs:
4347
- name: Setup Node14
4448
uses: actions/setup-node@v3
4549
with:
46-
node-version: 14
50+
node-version: ${{ inputs.node_version }}
4751
registry-url: "https://npm.pkg.github.com"
4852
scope: "@whereby"
4953

docs/examples/deploy_lambda/deploy_node_lambda.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
lambda_name: example-lambda
3636
aws_role_to_assume: arn:aws:iam::964528283748:role/ga-lambda-example-lambda-role
3737
source_dir: ./src
38+
node_version: 14
3839
secrets:
3940
node_auth_token: ${{ secrets.WHEREBY_GITHUB_TOKEN }}
4041
```
@@ -52,3 +53,6 @@ This should exist in ${{ secrets.WHEREBY_GITHUB_TOKEN }}
5253
## source_dir
5354

5455
This presumes that your package.json and lambda entrypoint exist in one folder.
56+
57+
## node_version
58+
The version of node to deploy with. Defaults to 14.

0 commit comments

Comments
 (0)