ci: explicitly fetch PR base SHA before diff
This commit is contained in:
@@ -19,6 +19,10 @@ jobs:
|
||||
run: |
|
||||
set -e
|
||||
base="${{ github.event.pull_request.base.sha }}"
|
||||
# act's actions/checkout@v4 doesn't reliably pull the base SHA
|
||||
# into the local history even with fetch-depth: 0. Fetch it
|
||||
# explicitly so the three-dot diff resolves.
|
||||
git fetch --depth=1 origin "$base" || git fetch --depth=1 origin
|
||||
changed=$(git diff --name-only "$base"...HEAD -- 'recipes/' \
|
||||
| awk -F/ '{print $2}' | sort -u)
|
||||
if [[ -z "$changed" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user