File tree 5 files changed +32
-23
lines changed
5 files changed +32
-23
lines changed Original file line number Diff line number Diff line change 24
24
environment :
25
25
required : true
26
26
type : string
27
- default : " dev"
28
27
secrets-location :
29
28
type : string
30
29
default : " local"
38
37
steps :
39
38
- name : Checkout repository
40
39
uses : actions/checkout@v3
41
- with :
42
- ref : ${{ inputs.environment }}
43
40
- name : Install AWS CLI
44
41
run : sudo snap install aws-cli --classic
45
42
- name : Install AWS CDK CLI
Original file line number Diff line number Diff line change 1
1
name : deploy-prod
2
2
3
3
on :
4
- workflow_run :
5
- workflows :
6
- - check
7
- types :
8
- - completed
9
- branches :
10
- - prod
4
+ push :
5
+ branches : ['prod']
11
6
12
7
jobs :
8
+ test :
9
+ uses : ./.github/workflows/test.yaml
10
+ with :
11
+ environment : prod
13
12
aws-deploy :
14
13
uses : " ./.github/workflows/aws-deploy.yaml"
15
14
with :
Original file line number Diff line number Diff line change 1
1
name : deploy-stage
2
2
3
3
on :
4
- workflow_run :
5
- workflows :
6
- - check
7
- types :
8
- - completed
9
- branches :
10
- - stage
4
+ push :
5
+ branches : ['stage']
11
6
12
7
jobs :
8
+ test :
9
+ uses : ./.github/workflows/test.yaml
10
+ with :
11
+ environment : stage
13
12
aws-deploy :
14
13
uses : " ./.github/workflows/aws-deploy.yaml"
15
14
with :
Original file line number Diff line number Diff line change
1
+ name : pr-check
2
+
3
+ on :
4
+ pull_request :
5
+ branches : ['*']
6
+
7
+ jobs :
8
+ test :
9
+ uses : ./.github/workflows/test.yaml
10
+ with :
11
+ environment : dev
Original file line number Diff line number Diff line change 1
- name : check
1
+ name : test
2
2
3
3
on :
4
- pull_request :
5
- branches : ['*']
6
- push :
7
- branches : ['*']
8
-
4
+ workflow_call :
5
+ inputs :
6
+ environment :
7
+ required : true
8
+ type : string
9
9
jobs :
10
10
unit-tests :
11
11
runs-on : ubuntu-latest
25
25
run : pip install -r requirements.txt -r requirements-dev.txt
26
26
- name : Generate cloudformation
27
27
uses : youyo/aws-cdk-github-actions@v2
28
+ env :
29
+ ENV : ${{ inputs.environment }}
30
+ secrets-location : " ssm"
28
31
with :
29
32
cdk_subcommand : ' synth'
30
33
actions_comment : false
You can’t perform that action at this time.
0 commit comments