Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Insufficient repository fetch-depth for action workflows (#109)
The GitHub action workflows [1] using the `actions/checkout` action [2] to fetch the repository that triggered the workflow. However, by default only the history of the latest commit was fetched which resulted in errors when wand tried to extract repository metadata information like the amount of commits ahead of the latest commit. As an example this can be seen when running the `bootstrap` command in the `test` job of the `ci-go` workflow [5] which failed with an `object not found` error because the history only contains a single commit. To fix this problem `action/checkout` provides an option to fetch all history for all tags and branches [3] which is now used to prevent errors like this in the pipeline. [1]: https://github.com/svengreb/wand/tree/9caf10f9d3b0c97e1f6c18b29c175e71764b0ece/.github/workflows [2]: https://github.com/actions/checkout [3]: https://github.com/actions/checkout#Fetch-all-history-for-all-tags-and-branches [4]: https://github.com/svengreb/wand/blob/cabd635c4ec73680b1776e7c536feca16643b00b/magefile.go#L136 [5]: https://github.com/svengreb/wand/runs/4275275079?check_suite_focus=true Closes GH-108
- Loading branch information