Skip to content

Commit

Permalink
add treeless clones to GitHub Actions guidance
Browse files Browse the repository at this point in the history
  • Loading branch information
adamralph committed Oct 15, 2023
1 parent e4e41e7 commit 6a38e20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,13 @@ By default, [GitHub Actions](https://github.com/features/actions/), [Azure Pipel

To build in GitHub Actions, Azure Pipelines, or Travis CI, configure them to fetch a sufficient number of commits.

For GitHub Actions, set the `fetch-depth` of the [checkout action](https://github.com/actions/checkout) to an appropriate number, or to zero for all commits. For example:
For GitHub Actions, set the `fetch-depth` of the [checkout action](https://github.com/actions/checkout) to an appropriate number, or to zero for all commits (you can also set `filter` to `tree:0` to create a [treeless clone](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/), for better performance). For example:

```yaml
- uses: actions/checkout@v2
with:
fetch-depth: 0
filter: tree:0
```

For Azure Pipelines, include an explicit [checkout step](https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/steps-checkout) and set the `fetchDepth` to an appropriate number, or to zero for all commits:
Expand Down

0 comments on commit 6a38e20

Please sign in to comment.