update readme

This commit is contained in:
darshanime 2026-07-14 19:55:23 +05:30
parent 33796bf525
commit 7d430834e6
2 changed files with 39 additions and 30 deletions

View file

@ -1,22 +1,23 @@
# WarpBuild Checkout # WarpBuild Checkout
This is [WarpBuild's](https://warpbuild.com) fork of `actions/checkout`, a drop-in This is [WarpBuild's](https://warpbuild.com) fork of `actions/checkout`, a drop-in
replacement that adds a **checkout snapshot cache**: on WarpBuild runners, the `.git` replacement that adds a **git-mirror cache**. On WarpBuild runners it keeps a per-repo
objects a checkout produces are tarred and cached remotely, keyed by the exact commit SHA. `base` bundle (full history, built once) plus a small per-branch delta bundle in object
A later job checking out the same commit restores that snapshot and skips the fetch from storage, and seeds them into the repository before the fetch — so the fetch from GitHub
GitHub entirely — cutting request load (the main source of GitHub rate-limiting on shrinks to just the **tip delta**. That cuts the requests and bytes pulled from GitHub.
matrix builds and busy repos). SHA keys are immutable, so there is no TTL or refresh. Bundles download over parallel ranged reads, rather than single-stream.
- Only the default checkout shape is cached (`fetch-depth: 1`, no tags/filter/sparse/LFS); - Engages only on WarpBuild runners, for the default shallow (`fetch-depth: 1`) and full
everything else runs exactly like upstream. (`fetch-depth: 0`) checkout shapes. Explicit shallow (`fetch-depth >= 2`), `filter`, and
- Zero new inputs — behavior is identical to upstream everywhere except WarpBuild runners. `sparse-checkout` defer to upstream. **LFS coexists** — the bundle carries the git
objects and stock `git lfs` pulls the binaries on top.
- No new inputs; adds one output, `cache-hit` (`true` when the checkout was seeded from the
mirror). Behavior is identical to upstream everywhere except WarpBuild runners.
- Fail-open — any cache error degrades to stock `actions/checkout` behavior. - Fail-open — any cache error degrades to stock `actions/checkout` behavior.
- All fork code lives in `src/warpbuild/` - All fork code lives in `src/warpbuild/`.
--- ---
[![Build and Test](https://github.com/actions/checkout/actions/workflows/test.yml/badge.svg)](https://github.com/actions/checkout/actions/workflows/test.yml)
# Checkout v7 # Checkout v7
## What's new ## What's new
@ -71,13 +72,13 @@ You are welcome to still raise bugs in this repo.
# What's new # What's new
Please refer to the [release page](https://github.com/actions/checkout/releases/latest) for the latest release notes. Please refer to the [release page](https://github.com/WarpBuilds/checkout/releases/latest) for the latest release notes.
# Usage # Usage
<!-- start usage --> <!-- start usage -->
```yaml ```yaml
- uses: actions/checkout@v7 - uses: WarpBuilds/checkout@v7
with: with:
# Repository name with owner. For example, actions/checkout # Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }} # Default: ${{ github.repository }}
@ -197,6 +198,14 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
``` ```
<!-- end usage --> <!-- end usage -->
# Outputs
| Output | Description |
| --- | --- |
| `ref` | The branch, tag or SHA that was checked out. |
| `commit` | The commit SHA that was checked out. |
| `cache-hit` | `true` if the checkout was seeded from the WarpBuild mirror (WarpBuild runners only), otherwise `false`. |
# Scenarios # Scenarios
- [Checkout V5](#checkout-v5) - [Checkout V5](#checkout-v5)
@ -225,7 +234,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
## Fetch only the root files ## Fetch only the root files
```yaml ```yaml
- uses: actions/checkout@v7 - uses: WarpBuilds/checkout@v7
with: with:
sparse-checkout: . sparse-checkout: .
``` ```
@ -233,7 +242,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
## Fetch only the root files and `.github` and `src` folder ## Fetch only the root files and `.github` and `src` folder
```yaml ```yaml
- uses: actions/checkout@v7 - uses: WarpBuilds/checkout@v7
with: with:
sparse-checkout: | sparse-checkout: |
.github .github
@ -243,7 +252,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
## Fetch only a single file ## Fetch only a single file
```yaml ```yaml
- uses: actions/checkout@v7 - uses: WarpBuilds/checkout@v7
with: with:
sparse-checkout: | sparse-checkout: |
README.md README.md
@ -253,7 +262,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
## Fetch all history for all tags and branches ## Fetch all history for all tags and branches
```yaml ```yaml
- uses: actions/checkout@v7 - uses: WarpBuilds/checkout@v7
with: with:
fetch-depth: 0 fetch-depth: 0
``` ```
@ -261,7 +270,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
## Checkout a different branch ## Checkout a different branch
```yaml ```yaml
- uses: actions/checkout@v7 - uses: WarpBuilds/checkout@v7
with: with:
ref: my-branch ref: my-branch
``` ```
@ -269,7 +278,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
## Checkout HEAD^ ## Checkout HEAD^
```yaml ```yaml
- uses: actions/checkout@v7 - uses: WarpBuilds/checkout@v7
with: with:
fetch-depth: 2 fetch-depth: 2
- run: git checkout HEAD^ - run: git checkout HEAD^
@ -279,12 +288,12 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
```yaml ```yaml
- name: Checkout - name: Checkout
uses: actions/checkout@v7 uses: WarpBuilds/checkout@v7
with: with:
path: main path: main
- name: Checkout tools repo - name: Checkout tools repo
uses: actions/checkout@v7 uses: WarpBuilds/checkout@v7
with: with:
repository: my-org/my-tools repository: my-org/my-tools
path: my-tools path: my-tools
@ -295,10 +304,10 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
```yaml ```yaml
- name: Checkout - name: Checkout
uses: actions/checkout@v7 uses: WarpBuilds/checkout@v7
- name: Checkout tools repo - name: Checkout tools repo
uses: actions/checkout@v7 uses: WarpBuilds/checkout@v7
with: with:
repository: my-org/my-tools repository: my-org/my-tools
path: my-tools path: my-tools
@ -309,12 +318,12 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
```yaml ```yaml
- name: Checkout - name: Checkout
uses: actions/checkout@v7 uses: WarpBuilds/checkout@v7
with: with:
path: main path: main
- name: Checkout private tools - name: Checkout private tools
uses: actions/checkout@v7 uses: WarpBuilds/checkout@v7
with: with:
repository: my-org/my-private-tools repository: my-org/my-private-tools
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
@ -327,7 +336,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
## Checkout pull request HEAD commit instead of merge commit ## Checkout pull request HEAD commit instead of merge commit
```yaml ```yaml
- uses: actions/checkout@v7 - uses: WarpBuilds/checkout@v7
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
``` ```
@ -343,7 +352,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v7 - uses: WarpBuilds/checkout@v7
``` ```
## Push a commit using the built-in token ## Push a commit using the built-in token
@ -354,7 +363,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v7 - uses: WarpBuilds/checkout@v7
- run: | - run: |
date > generated.txt date > generated.txt
# Note: the following account information will not work on GHES # Note: the following account information will not work on GHES
@ -376,7 +385,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v7 - uses: WarpBuilds/checkout@v7
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
- run: | - run: |

View file

@ -123,7 +123,7 @@ function updateUsage(
} }
updateUsage( updateUsage(
'actions/checkout@v7', 'WarpBuilds/checkout@v7',
path.join(__dirname, '..', '..', 'action.yml'), path.join(__dirname, '..', '..', 'action.yml'),
path.join(__dirname, '..', '..', 'README.md') path.join(__dirname, '..', '..', 'README.md')
) )