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:
Vladimir Reznichenko 2024-08-01 14:18:08 +02:00 committed by GitHub
parent a15235d230
commit 8da5a91842
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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: