I think this is a sane default for the CI of nix projects hosted on github and gitlab. A typical build doesn't need git history, just the source at a fixed ref. And because of this, many projects with large histories may try to optimize their builds by using shallow clones one way or the other. But for git hosts which serve source archives, nix has a built-in capability to bypass this problem. And it gives you a single line you can use to reproduce the build locally, or from anywhere else, even in extremely minimal environments: not even git is required. e: Oh, and also, I don't know how often dependabot prompts you to update the version of the checkout action, but, this would get rid of that.
But this is all just my opinion, and I'm interested in yours. :)
One thing that I often forget and that might be worth underlining: on pull_request events, $GITHUB_REF is the last merge commit on the branch refs/pull/:prNumber/merge. So the build would not be run on the PR's comparison branch, but on the merge of it with the PR's base branch. e: You can see this in the current check result: the ref being downloaded is different from the one on my branch.
I think this is a sane default for the CI of nix projects hosted on github and gitlab. A typical build doesn't need git history, just the source at a fixed ref. And because of this, many projects with large histories may try to optimize their builds by using shallow clones one way or the other. But for git hosts which serve source archives, nix has a built-in capability to bypass this problem. And it gives you a single line you can use to reproduce the build locally, or from anywhere else, even in extremely minimal environments: not even git is required. e: Oh, and also, I don't know how often dependabot prompts you to update the version of the checkout action, but, this would get rid of that.
But this is all just my opinion, and I'm interested in yours. :)
One thing that I often forget and that might be worth underlining: on
pull_request
events,$GITHUB_REF
is the last merge commit on the branchrefs/pull/:prNumber/merge
. So the build would not be run on the PR's comparison branch, but on the merge of it with the PR's base branch. e: You can see this in the current check result: the ref being downloaded is different from the one on my branch.