Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/README.md b/README.md
index 8fe140f..5427a50 100644
--- a/README.md
+++ b/README.md
@@ -74,6 +74,15 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl
# Default: true
clean: ''
+ # Do a sparse checkout on given patterns. Each pattern should be separated with
+ # new lines
+ # Default: null
+ sparse-checkout: ''
+
+ # Specifies whether to use cone-mode when doing a sparse checkout.
+ # Default: true
+ sparse-checkout-cone-mode: ''
+
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: ''
@@ -106,6 +115,9 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl
# Scenarios
+- [Fetch only the root files](#Fetch-only-the-root-files)
+- [Fetch only the root files and `.github` and `src` folder](#Fetch-only-the-root-files-and-github-and-src-folder)
+- [Fetch only a single file](#Fetch-only-a-single-file)
- [Fetch all history for all tags and branches](#Fetch-all-history-for-all-tags-and-branches)
- [Checkout a different branch](#Checkout-a-different-branch)
- [Checkout HEAD^](#Checkout-HEAD)
@@ -116,6 +128,34 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl
- [Checkout pull request on closed event](#Checkout-pull-request-on-closed-event)
- [Push a commit using the built-in token](#Push-a-commit-using-the-built-in-token)
+## Fetch only the root files
+
+```yaml
+- uses: actions/checkout@v3
+ with:
+ sparse-checkout: .
+```
+
+## Fetch only the root files and `.github` and `src` folder
+
+```yaml
+- uses: actions/checkout@v3
+ with:
+ sparse-checkout: |
+ .github
+ src
+```
+
+## Fetch only a single file
+
+```yaml
+- uses: actions/checkout@v3
+ with:
+ sparse-checkout: |
+ README.md
+ sparse-checkout-cone-mode: false
+```
+
## Fetch all history for all tags and branches
```yaml