Skip to content

Commit bfe845e

Browse files
committed
Fetch full repository on GitHub Actions workflow
Fetching with the default fetch-depth of 1 led to a strange bug where the commit fetched would be different from the one that triggered the build, unless the build was triggered manually. It is not entirely clear why this happens, and debugging with using things like `git rev-parse HEAD` etc didn't give any hints. The issue [here](actions/checkout#439) seems to be the problem, and this commit addresses it by setting fetch-depth to 0.
1 parent 0074325 commit bfe845e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/copy-successful-builds.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ jobs:
1616
steps:
1717
- name: Checkout code
1818
uses: actions/checkout@v3
19-
# FIXME: Can use this when the script is merged to main
20-
# with:
21-
# ref: 'main'
19+
with:
20+
fetch-depth: 0
2221

2322
- name: Run script to copy successful builds
2423
env:

0 commit comments

Comments
 (0)