File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 11name : Build and deploy lambda to AWS
22
33on :
4- workflow_dispatch :
4+ workflow_dispatch :
5+
6+ push :
7+ branches : [main]
8+ paths :
9+ - ' .github/workflows/buildAndDeployLambda.yaml'
10+ - ' scripts/deployLambda.sc'
11+ - ' !**.test.scala'
12+ - ' **.scala'
513
614env :
715 AWS_CLIENT_DEBUG_MODE : ON
3341 - name : Show changelog
3442 run : echo "CHANGELOG=$(git log --pretty='%h %al %B' ${{ github.event.before }}..${{ github.sha }})" | tr -d "\n\r\'" | cut -c -256 >> "$GITHUB_ENV"
3543 - name : Run the script
36- run : ' ./scripts/buildAndDeployLambdaNativePackage.sh 64m'
44+ run : ./scripts/buildAndDeployLambdaNativePackage.sh 64m '${{ env.CHANGELOG }} '
3745 shell : bash
3846
3947
Original file line number Diff line number Diff line change 11#! /bin/sh
22
33help () {
4- echo " Usage: buildAndDeployLambda.sh heapsize"
4+ echo " Usage: buildAndDeployLambda.sh heapsize changelog "
55 exit 2
66}
77
@@ -37,7 +37,9 @@ run() {
3737
3838 cd ..
3939
40- scala --power ./scripts/deployLambda.sc
40+ scala --power ./scripts/deployLambda.sc \
41+ -- \
42+ --description=" $changelog "
4143
4244 else
4345 echo " \033[31mFailure: Missing ${folder} /bin/boostrap file. Check native-package build logs.\033[0m"
@@ -49,9 +51,10 @@ run() {
4951 fi
5052}
5153
52- if [ $# -eq 1 ]; then
54+ if [ $# -eq 2 ]; then
5355
5456 heapsize=$1
57+ changelog=$2
5558
5659 run
5760else
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ val lambdaDeploymentConfigPath = os.pwd / "lambda-deployment-config.json"
3333val zipFilePath = os.pwd / " bin" / " function.zip"
3434
3535val description : String =
36- scala.util. Try ( System .getenv( " CHANGELOG " )).toOption.flatMap( Option .apply ).getOrElse(" " )
36+ optionalScriptParameter( 'd' , " description " )(args ).getOrElse(" " )
3737
3838if (! os.exists(lambdaDeploymentConfigPath)) {
3939 println(
You can’t perform that action at this time.
0 commit comments