CI: speedup 'Build Project Jobs' (#50197)
In this PR, we use shallow checkout if the environment provides no base_ref, which is needed for identifying changed files. If no ref provided, we are not able to calculate the diff and therefore go with faster shallow copy.
This commit is contained in:
parent
a15235d230
commit
8da5a91842
|
@ -38,7 +38,8 @@ jobs:
|
|||
- uses: 'actions/checkout@v4'
|
||||
name: 'Checkout'
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# If 'base_ref' is available, the 'Build Matrix' step requires non-shallow git-history to identify changed files.
|
||||
fetch-depth: ${{ ( ( github.base_ref && '0' ) || '1' ) }}
|
||||
- uses: './.github/actions/setup-woocommerce-monorepo'
|
||||
name: 'Setup Monorepo'
|
||||
with:
|
||||
|
|
Loading…
Reference in New Issue