File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -8,27 +8,27 @@ ORANGE='\033[0;33m'
88BLUE=' \033[0;34m'
99
1010# 0) Validation
11- if [ -z " $INPUT_CODEDEPLOY_NAME " ]; then
11+ if [ -z " $INPUT_CODEDEPLOY_NAME " ] && [ -z " $INPUT_DRY_RUN " ] ; then
1212 echo " ::error::codedeploy_name is required and must not be empty."
1313 exit 1;
1414fi
1515
16- if [ -z " $INPUT_CODEDEPLOY_GROUP " ]; then
16+ if [ -z " $INPUT_CODEDEPLOY_GROUP " ] && [ -z " $INPUT_DRY_RUN " ] ; then
1717 echo " ::error::codedeploy_group is required and must not be empty."
1818 exit 1;
1919fi
2020
21- if [ -z " $INPUT_AWS_ACCESS_KEY " ]; then
21+ if [ -z " $INPUT_AWS_ACCESS_KEY " ] && [ -z " $INPUT_DRY_RUN " ] ; then
2222 echo " ::error::aws_access_key is required and must not be empty."
2323 exit 1;
2424fi
2525
26- if [ -z " $INPUT_AWS_SECRET_KEY " ]; then
26+ if [ -z " $INPUT_AWS_SECRET_KEY " ] && [ -z " $INPUT_DRY_RUN " ] ; then
2727 echo " ::error::aws_secret_key is required and must not be empty."
2828 exit 1;
2929fi
3030
31- if [ -z " $INPUT_S3_BUCKET " ]; then
31+ if [ -z " $INPUT_S3_BUCKET " ] && [ -z " $INPUT_DRY_RUN " ] ; then
3232 echo " ::error::s3_bucket is required and must not be empty."
3333 exit 1;
3434fi
@@ -93,6 +93,11 @@ function getArchiveETag() {
9393 --query ETag --output text
9494}
9595
96+ if " $INPUT_DRY_RUN " ; then
97+ echo " ::debug::Dry Run detected. Exiting."
98+ exit 0;
99+ fi
100+
96101aws s3 cp " $ZIP_FILENAME " s3://" $INPUT_S3_BUCKET " /" $INPUT_S3_FOLDER " /" $ZIP_FILENAME "
97102
98103echo " ::debug::Zip uploaded to S3."
You can’t perform that action at this time.
0 commit comments