Skip to content

Commit b56172b

Browse files
authored
Merge pull request #12 from youyo/feature/debug-option
Add debug_log option
2 parents 5277057 + c8a987a commit b56172b

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
- `cdk_stack` AWS CDK stack name to execute. (default: '*')
8989
- `working_dir` AWS CDK working directory. (default: '.')
9090
- `actions_comment` Whether or not to comment on pull requests. (default: true)
91+
- `debug_log` Enable debug-log. (default: false)
9192

9293
## Outputs
9394

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ inputs:
2020
actions_comment:
2121
description: 'Whether or not to comment on pull requests.'
2222
default: true
23+
debug_log:
24+
description: 'Enable debug-log'
25+
default: false
2326
outputs:
2427
status_code:
2528
description: 'Returned status code.'

entrypoint.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,24 @@ function installTypescript(){
1717
function installAwsCdk(){
1818
echo "Install aws-cdk ${INPUT_CDK_VERSION}"
1919
if [ "${INPUT_CDK_VERSION}" == "latest" ]; then
20-
npm install -g aws-cdk >/dev/null 2>&1
20+
if [ "${INPUT_DEBUG_LOG}" == "true" ]; then
21+
npm install -g aws-cdk
22+
else
23+
npm install -g aws-cdk >/dev/null 2>&1
24+
fi
25+
2126
if [ "${?}" -ne 0 ]; then
2227
echo "Failed to install aws-cdk ${INPUT_CDK_VERSION}"
2328
else
2429
echo "Successful install aws-cdk ${INPUT_CDK_VERSION}"
2530
fi
2631
else
27-
npm install -g aws-cdk@${INPUT_CDK_VERSION} >/dev/null 2>&1
32+
if [ "${INPUT_DEBUG_LOG}" == "true" ]; then
33+
npm install -g aws-cdk@${INPUT_CDK_VERSION}
34+
else
35+
npm install -g aws-cdk@${INPUT_CDK_VERSION} >/dev/null 2>&1
36+
fi
37+
2838
if [ "${?}" -ne 0 ]; then
2939
echo "Failed to install aws-cdk ${INPUT_CDK_VERSION}"
3040
else
@@ -36,7 +46,12 @@ function installAwsCdk(){
3646
function installPipRequirements(){
3747
if [ -e "requirements.txt" ]; then
3848
echo "Install requirements.txt"
39-
pip install -r requirements.txt >/dev/null 2>&1
49+
if [ "${INPUT_DEBUG_LOG}" == "true" ]; then
50+
pip install -r requirements.txt
51+
else
52+
pip install -r requirements.txt >/dev/null 2>&1
53+
fi
54+
4055
if [ "${?}" -ne 0 ]; then
4156
echo "Failed to install requirements.txt"
4257
else

0 commit comments

Comments
 (0)