Skip to content

Commit 7ba845f

Browse files
committed
Fetch origin/master after checking out the repo
so we can perform git-diff to know which files has been changed in the patch.
1 parent 4ff3ff3 commit 7ba845f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/preview.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v4
19+
- name: Fetch master
20+
run: |
21+
commits=${{ github.event.pull_request.commits }}
22+
if [[ -n "$commits" ]]; then
23+
# Prepare enough depth for diffs with master
24+
git fetch --depth="$(( commits + 1 ))"
25+
fi
1926
2027
- uses: ruby/setup-ruby@v1
2128
with:

0 commit comments

Comments
 (0)