File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,23 +114,30 @@ jobs:
114114 - name : Install jq
115115 if : inputs.functions != '[]'
116116 run : sudo apt-get update && sudo apt-get install -y jq
117+
117118 - name : Build and Package All Lambda Functions
118- if : inputs.functions != '[]'
119119 run : |
120- echo "Parsing functions input..."
121- echo '${{ inputs.functions }}' | jq -c '.[]' | while read func; do
122- NAME=$(echo "$func" | jq -r '.name')
123- PATH=$(echo "$func" | jq -r '.path')
120+ # export PATH="$PATH:/usr/share/dotnet"
121+ which dotnet
122+ dotnet --version
123+ dotnet tool list
124+
125+ FUNCTIONS='${{ inputs.functions }}'
126+ COUNT=$(echo "$FUNCTIONS" | jq length)
127+
128+ for i in $(seq 0 $((COUNT - 1))); do
129+ NAME=$(echo "$FUNCTIONS" | jq -r ".[$i].name")
130+ PATH=$(echo "$FUNCTIONS" | jq -r ".[$i].path")
124131 ZIP_PATH="${{ env.outputPath }}/${NAME}.zip"
125132
126- echo "Building $NAME from $PATH..."
133+ echo "Packaging $NAME from $PATH..."
127134 dotnet tool run dotnet-lambda package -pl "$PATH" \
128135 --configuration ${{ inputs.buildConfiguration }} \
129136 --no-restore \
130137 --framework ${{ inputs.lambdaRuntimeVersion }} \
131138 --output-package "$ZIP_PATH"
132139
133- echo "Built and packaged : $ZIP_PATH"
140+ echo "Packaged : $ZIP_PATH"
134141 done
135142
136143 - name : Setup Node.js
You can’t perform that action at this time.
0 commit comments