File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,12 +28,17 @@ jobs:
2828 - name : Detect recordprocessor changes in PR
2929 id : detect
3030 run : |
31- git fetch origin "${{ github.event.pull_request.base.ref }}"
31+ current_sha="${{ github.event.pull_request.head.sha }}"
32+ previous_sha="${{ github.event.before }}"
3233
33- if git diff --name-only "origin/${{ github.event.pull_request.base.ref }}" "${{ github.sha }}" | grep -q '^lambdas/recordprocessor/'; then
34- echo "has_changes=true" >> "$GITHUB_OUTPUT"
35- else
34+ if [ -z "$previous_sha" ] || [ "$previous_sha" = "0000000000000000000000000000000000000000" ]; then
35+ previous_sha="$(git rev-parse "${current_sha}^")"
36+ fi
37+
38+ if git diff --quiet "$previous_sha" "$current_sha" -- lambdas/recordprocessor/; then
3639 echo "has_changes=false" >> "$GITHUB_OUTPUT"
40+ else
41+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
3742 fi
3843
3944 deploy-pr-backend :
You can’t perform that action at this time.
0 commit comments