Skip to content

Commit

Permalink
Fetch full repository on GitHub Actions workflow
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
punchagan committed Jul 27, 2022
1 parent 63363d3 commit 6fa2669
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/copy-successful-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
# FIXME: Can use this when the script is merged to main
# with:
# ref: 'main'
with:
fetch-depth: 0

- name: Run script to copy successful builds
env:
Expand Down

0 comments on commit 6fa2669

Please sign in to comment.