Skip to content

Commit b8e039d

Browse files
authored
Fix SHA range for incremental CI builds (#687)
* Use `github.event.before` and `github.event.after` for FromSha and ToSha when computing changed components * Update push trigger to include 'ci/dev/**' branches for testing CI workflows * Minor formatting fix * Fix minor syntax error * Minor formatting fix * Remove 'ci/dev/**' from branch push trigger * Revert "Minor formatting fix" This reverts commit df913fa. * Revert "Minor formatting fix" This reverts commit 83b036a. * Remove positional parameters for `Get-Changed-Components.ps1` to enable fallback values when empty strings are provided by workflow run.
1 parent 5b91ace commit b8e039d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
# Get changed components
133133
- name: Get changed components
134134
run: |
135-
$changedComponents = $(./tooling/Get-Changed-Components.ps1)
135+
$changedComponents = $(./tooling/Get-Changed-Components.ps1 ${{ github.event.before }} ${{ github.event.after }})
136136
$buildableChangedComponents = $(./tooling/MultiTarget/Filter-Supported-Components.ps1 -Components $changedComponents -MultiTargets ${{ matrix.multitarget }} -WinUIMajorVersion ${{ matrix.winui }})
137137
echo "CHANGED_COMPONENTS_LIST=$(($buildableChangedComponents | ForEach-Object { "$_" }) -join ',')" >> $env:GITHUB_ENV
138138
echo "HAS_BUILDABLE_COMPONENTS=$($buildableChangedComponents.Count -gt 0)" >> $env:GITHUB_ENV
@@ -268,7 +268,7 @@ jobs:
268268
# Get changed components
269269
- name: Get changed components
270270
run: |
271-
$changedComponents = $(./tooling/Get-Changed-Components.ps1)
271+
$changedComponents = $(./tooling/Get-Changed-Components.ps1 ${{ github.event.before }} ${{ github.event.after }})
272272
$buildableChangedComponents = $(./tooling/MultiTarget/Filter-Supported-Components.ps1 -Components $changedComponents -MultiTargets "all" -WinUIMajorVersion ${{ matrix.winui }})
273273
echo "CHANGED_COMPONENTS_LIST=$(($buildableChangedComponents | ForEach-Object { "$_" }) -join ',')" >> $env:GITHUB_ENV
274274
echo "HAS_BUILDABLE_COMPONENTS=$($buildableChangedComponents.Count -gt 0)" >> $env:GITHUB_ENV

0 commit comments

Comments
 (0)