0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix: update the alteration change detection script (#5206)

diff the merge base changes only
This commit is contained in:
simeng-li 2024-01-08 11:04:24 +08:00 committed by GitHub
parent 96fe93225e
commit 9bcbcc2d24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,8 @@ jobs:
- name: Check for alteration changes
id: changes-detection
run: |
CHANGE_FILES=$(git diff --name-only HEAD..origin/${{github.base_ref}} | grep 'packages/schemas/alterations/' || true)
MERGE_BASE=$(git merge-base origin/${{github.base_ref}} HEAD)
CHANGE_FILES=$(git diff --name-only $MERGE_BASE | grep 'packages/schemas/alterations/' || true)
if [ -n "$CHANGE_FILES" ]; then
echo "$CHANGE_FILES"
echo "::set-output name=has-alteration-changes::true"