Skip to content

Commit

Permalink
ci: fetch-depth 0 to fetch complete history
Browse files Browse the repository at this point in the history
With `${{ github.event.pull_request.commits }}` we don't fetch enough
commits to diff against the merge base. We require `pull_request.commits + 1`
commits to be able do that.

An alternative is to just fetch the complete git history as we don't
expect this repository to grow to a point where this has a
significant impact on CI performance.
  • Loading branch information
willcl-ark authored and 0xB10C committed Jun 17, 2024
1 parent f7ee0b2 commit cbfaa87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/shasum-summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event.pull_request.commits }}
fetch-depth: 0
- name: show changed files
run: git diff --no-commit-id --name-only ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
- name: run shasum-summary
Expand Down

0 comments on commit cbfaa87

Please sign in to comment.