Skip to content

Commit ea47e06

Browse files
committed
deployment test
1 parent 4ab3b63 commit ea47e06

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/pr-deploy-and-test.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)