Merge pull request #3958 from ollama/mxyng/fix-workflow

use merge base for diff-tree
This commit is contained in:
Michael Yang 2024-04-26 14:17:56 -07:00 committed by GitHub
commit 7fea1ecdf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,7 +31,9 @@ jobs:
- id: changes
run: |
changed() {
git diff-tree -r --no-commit-id --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} \
git diff-tree -r --no-commit-id --name-only \
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) \
${{ github.event.pull_request.head.sha }} \
| xargs python3 -c "import sys; print(any([x.startswith('$1') for x in sys.argv[1:]]))"
}