Skip to content

Commit d8614bd

Browse files
committed
feat: updated README.md with a new example
1 parent eea6d0e commit d8614bd

1 file changed

Lines changed: 22 additions & 12 deletions

File tree

README.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl
7474
# Default: true
7575
clean: ''
7676

77-
# Do a sparse checkout on given patterns. Each pattern should be sepparated with
77+
# Do a sparse checkout on given patterns. Each pattern should be separated with
7878
# new lines
7979
# Default: null
8080
sparse-checkout: ''
@@ -111,17 +111,18 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl
111111
112112
# Scenarios
113113
114-
- [Fetch only the root files](#fetch-only-the-root-files)
115-
- [Fetch only the root files and `.github` and `src` folder](#fetch-only-the-root-files-and-github-and-src-folder)
116-
- [Fetch all history for all tags and branches](#fetch-all-history-for-all-tags-and-branches)
117-
- [Checkout a different branch](#checkout-a-different-branch)
118-
- [Checkout HEAD^](#checkout-head)
119-
- [Checkout multiple repos (side by side)](#checkout-multiple-repos-side-by-side)
120-
- [Checkout multiple repos (nested)](#checkout-multiple-repos-nested)
121-
- [Checkout multiple repos (private)](#checkout-multiple-repos-private)
122-
- [Checkout pull request HEAD commit instead of merge commit](#checkout-pull-request-head-commit-instead-of-merge-commit)
123-
- [Checkout pull request on closed event](#checkout-pull-request-on-closed-event)
124-
- [Push a commit using the built-in token](#push-a-commit-using-the-built-in-token)
114+
- [Fetch only the root files](#Fetch-only-the-root-files)
115+
- [Fetch only the root files and `.github` and `src` folder](#Fetch-only-the-root-files-and-github-and-src-folder)
116+
- [Fetch only a single file](#Fetch-only-a-single-file)
117+
- [Fetch all history for all tags and branches](#Fetch-all-history-for-all-tags-and-branches)
118+
- [Checkout a different branch](#Checkout-a-different-branch)
119+
- [Checkout HEAD^](#Checkout-HEAD)
120+
- [Checkout multiple repos (side by side)](#Checkout-multiple-repos-side-by-side)
121+
- [Checkout multiple repos (nested)](#Checkout-multiple-repos-nested)
122+
- [Checkout multiple repos (private)](#Checkout-multiple-repos-private)
123+
- [Checkout pull request HEAD commit instead of merge commit](#Checkout-pull-request-HEAD-commit-instead-of-merge-commit)
124+
- [Checkout pull request on closed event](#Checkout-pull-request-on-closed-event)
125+
- [Push a commit using the built-in token](#Push-a-commit-using-the-built-in-token)
125126

126127
## Fetch only the root files
127128

@@ -141,6 +142,15 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl
141142
src
142143
```
143144

145+
## Fetch only a single file
146+
147+
```yaml
148+
- uses: actions/checkout@v3
149+
with:
150+
sparse-checkout: |
151+
/README.md
152+
```
153+
144154
## Fetch all history for all tags and branches
145155

146156
```yaml

0 commit comments

Comments
 (0)