File tree Expand file tree Collapse file tree 5 files changed +32
-23
lines changed
Expand file tree Collapse file tree 5 files changed +32
-23
lines changed Original file line number Diff line number Diff line change 2424 environment :
2525 required : true
2626 type : string
27- default : " dev"
2827 secrets-location :
2928 type : string
3029 default : " local"
3837 steps :
3938 - name : Checkout repository
4039 uses : actions/checkout@v3
41- with :
42- ref : ${{ inputs.environment }}
4340 - name : Install AWS CLI
4441 run : sudo snap install aws-cli --classic
4542 - name : Install AWS CDK CLI
Original file line number Diff line number Diff line change 11name : deploy-prod
22
33on :
4- workflow_run :
5- workflows :
6- - check
7- types :
8- - completed
9- branches :
10- - prod
4+ push :
5+ branches : ['prod']
116
127jobs :
8+ test :
9+ uses : ./.github/workflows/test.yaml
10+ with :
11+ environment : prod
1312 aws-deploy :
1413 uses : " ./.github/workflows/aws-deploy.yaml"
1514 with :
Original file line number Diff line number Diff line change 11name : deploy-stage
22
33on :
4- workflow_run :
5- workflows :
6- - check
7- types :
8- - completed
9- branches :
10- - stage
4+ push :
5+ branches : ['stage']
116
127jobs :
8+ test :
9+ uses : ./.github/workflows/test.yaml
10+ with :
11+ environment : stage
1312 aws-deploy :
1413 uses : " ./.github/workflows/aws-deploy.yaml"
1514 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
22
33on :
4- pull_request :
5- branches : ['*']
6- push :
7- branches : ['*']
8-
4+ workflow_call :
5+ inputs :
6+ environment :
7+ required : true
8+ type : string
99jobs :
1010 unit-tests :
1111 runs-on : ubuntu-latest
2525 run : pip install -r requirements.txt -r requirements-dev.txt
2626 - name : Generate cloudformation
2727 uses : youyo/aws-cdk-github-actions@v2
28+ env :
29+ ENV : ${{ inputs.environment }}
30+ secrets-location : " ssm"
2831 with :
2932 cdk_subcommand : ' synth'
3033 actions_comment : false
You can’t perform that action at this time.
0 commit comments