Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cdk-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ jobs:
done < <(jq -r '(.context // {}) | to_entries[] | [.key, .value] | @tsv' <<<"$entry")
while IFS=$'\t' read -r key regex; do
[[ -n "$key" ]] || continue
value=$(jq -r --arg re "$regex" '[.. | strings | capture($re)?.value] | first // empty' "$deployed")
value=$(jq -r --arg re "$regex" 'first(.. | strings | capture($re)? | .value) // empty' "$deployed")
if [[ -z "$value" ]]; then
echo "::error::$stack: no deployed template string matched contextFromDeployed.$key."
failed=1
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,13 @@ jobs:
exit 1

- name: Set Default Output Path If Not Provided
# Not named outputPath: MSBuild reads environment variables as properties, and an `outputPath`
# variable would redirect every project's OutputPath into this one folder.
run: |
if [ -z "${{ inputs.outputPath }}" ]; then
echo "outputPath=${{ github.workspace }}/publish" >> $GITHUB_ENV
echo "TEMPLATE_OUTPUT_PATH=${{ github.workspace }}/publish" >> $GITHUB_ENV
else
echo "outputPath=${{ github.workspace}}/${{ inputs.outputPath }}" >> $GITHUB_ENV
echo "TEMPLATE_OUTPUT_PATH=${{ github.workspace}}/${{ inputs.outputPath }}" >> $GITHUB_ENV
fi

- name: Validate .NET Inputs
Expand Down Expand Up @@ -252,7 +254,7 @@ jobs:

- name: Build and Publish Blazor WebAssembly
if: inputs.webPath != ''
run: dotnet publish ${{ inputs.webPath }} --configuration "${{ inputs.buildConfiguration }}" --no-restore --output ${{ env.outputPath }}
run: dotnet publish ${{ inputs.webPath }} --configuration "${{ inputs.buildConfiguration }}" --no-restore --output ${{ env.TEMPLATE_OUTPUT_PATH }}

- name: Detect Lambda custom build images
id: lambda-custom-container
Expand All @@ -278,7 +280,7 @@ jobs:
functions: ${{ inputs.functions }}
configuration: ${{ inputs.buildConfiguration }}
lambdaRuntimeVersion: ${{ inputs.lambdaRuntimeVersion }}
outputPath: ${{ env.outputPath }}
outputPath: ${{ env.TEMPLATE_OUTPUT_PATH }}

# Functions whose own aws-lambda-tools-defaults.json declares `container-image-for-build` were
# already built and packaged by the step above, from an isolated checkout copy - see that
Expand All @@ -297,7 +299,7 @@ jobs:
echo "Skipping $NAME - already packaged by the Native AOT isolated-build step"
continue
fi
ZIP_PATH="${{ env.outputPath }}/${NAME}.zip"
ZIP_PATH="${{ env.TEMPLATE_OUTPUT_PATH }}/${NAME}.zip"
dotnet tool run dotnet-lambda package -pl "$FUNC_PATH" --configuration "${{ inputs.buildConfiguration }}" --no-restore --framework ${{ inputs.lambdaRuntimeVersion }} --output-package "$ZIP_PATH"
done

Expand Down Expand Up @@ -414,11 +416,13 @@ jobs:
exit 1

- name: Set Default Output Path If Not Provided
# Not named outputPath: MSBuild reads environment variables as properties, and an `outputPath`
# variable would redirect every project's OutputPath into this one folder.
run: |
if [ -z "${{ inputs.outputPath }}" ]; then
echo "outputPath=${{ github.workspace }}/publish" >> $GITHUB_ENV
echo "TEMPLATE_OUTPUT_PATH=${{ github.workspace }}/publish" >> $GITHUB_ENV
else
echo "outputPath=${{ github.workspace}}/${{ inputs.outputPath }}" >> $GITHUB_ENV
echo "TEMPLATE_OUTPUT_PATH=${{ github.workspace}}/${{ inputs.outputPath }}" >> $GITHUB_ENV
fi

- name: Checkout Repository
Expand Down Expand Up @@ -534,7 +538,7 @@ jobs:
exit 1
fi

SITE_OUT="${{ env.outputPath }}/$OUTPUT_SUBDIR"
SITE_OUT="${{ env.TEMPLATE_OUTPUT_PATH }}/$OUTPUT_SUBDIR"
rm -rf "$SITE_OUT"
mkdir -p "$SITE_OUT"
cp -a "$BUILD_OUT/." "$SITE_OUT/"
Expand Down
Loading