Skip to content

Commit 3fbebdd

Browse files
committed
fix(ci): use two-dot diff for Cargo.lock check to avoid merge base requirement in shallow clones
1 parent e386cd5 commit 3fbebdd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/contract-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
if: github.event_name == 'pull_request'
4141
run: |
4242
git fetch origin "${{ github.base_ref }}" --depth=100
43-
changed_files="$(git diff --name-only "origin/${{ github.base_ref }}...HEAD" -- app/onchain/Cargo.toml app/onchain/Cargo.lock)"
43+
changed_files="$(git diff --name-only "origin/${{ github.base_ref }}" HEAD -- app/onchain/Cargo.toml app/onchain/Cargo.lock)"
4444
if echo "$changed_files" | grep -q '^app/onchain/Cargo.toml$' && ! echo "$changed_files" | grep -q '^app/onchain/Cargo.lock$'; then
4545
echo "Cargo.toml changed without updating Cargo.lock."
4646
exit 1

0 commit comments

Comments
 (0)