Skip to content

Commit 32b121a

Browse files
authored
feat: add support for default aws variables (#381)
* feat: add support for default aws variables closes: #372 * ci: update for NX caching support
1 parent ae61856 commit 32b121a

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/ngx-aws-deploy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ jobs:
1212
strategy:
1313
matrix:
1414
node-version: [12.x, 14.x, 15.x]
15-
15+
16+
env:
17+
NX_BRANCH: ${{ github.event.number }}
18+
NX_RUN_GROUP: ${{ github.run_id }}
19+
1620
steps:
1721
- name: Clone repository
1822
# `fetch-depth` defaults to 1.

libs/ngx-aws-deploy/src/lib/deploy/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { Schema } from './schema';
22

33
export const getAccessKeyId = (): string => {
4-
return process.env.NG_DEPLOY_AWS_ACCESS_KEY_ID as string;
4+
return process.env.NG_DEPLOY_AWS_ACCESS_KEY_ID as string || process.env.AWS_ACCESS_KEY_ID as string;
55
};
66

77
export const getSecretAccessKey = (): string => {
8-
return process.env.NG_DEPLOY_AWS_SECRET_ACCESS_KEY as string;
8+
return process.env.NG_DEPLOY_AWS_SECRET_ACCESS_KEY as string || process.env.AWS_SECRET_ACCESS_KEY as string;
99
};
1010

1111
export const getBucket = (builderConfig: Schema): string => {
1212
return process.env.NG_DEPLOY_AWS_BUCKET || (builderConfig.bucket as string);
1313
};
1414

1515
export const getRegion = (builderConfig: Schema): string => {
16-
return process.env.NG_DEPLOY_AWS_REGION || (builderConfig.region as string);
16+
return process.env.NG_DEPLOY_AWS_REGION || (builderConfig.region as string) || process.env.AWS_DEFAULT_REGION;
1717
};
1818

1919
export const getSubFolder = (builderConfig: Schema): string => {

libs/ngx-aws-deploy/src/lib/deploy/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "Schema",
2+
"$id": "Schema",
33
"title": "schema",
44
"description": "Deployment of Angular CLI applications to AWS",
55
"properties": {

0 commit comments

Comments
 (0)