Skip to content

Commit a12a394

Browse files
authored
update readme for v3 (#708)
* update readme for v3 * update readme with changes * nit grammar
1 parent 8f9e05e commit a12a394

File tree

2 files changed

+17
-30
lines changed

2 files changed

+17
-30
lines changed

README.md

+16-29
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<a href="https://github.com/actions/checkout"><img alt="GitHub Actions status" src="https://github.com/actions/checkout/workflows/test-local/badge.svg"></a>
33
</p>
44

5-
# Checkout V2
5+
# Checkout V3
66

77
This action checks-out your repository under `$GITHUB_WORKSPACE`, so your workflow can access it.
88

@@ -14,27 +14,14 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl
1414

1515
# What's new
1616

17-
- Improved performance
18-
- Fetches only a single commit by default
19-
- Script authenticated git commands
20-
- Auth token persisted in the local git config
21-
- Supports SSH
22-
- Creates a local branch
23-
- No longer detached HEAD when checking out a branch
24-
- Improved layout
25-
- The input `path` is always relative to $GITHUB_WORKSPACE
26-
- Aligns better with container actions, where $GITHUB_WORKSPACE gets mapped in
27-
- Fallback to REST API download
28-
- When Git 2.18 or higher is not in the PATH, the REST API will be used to download the files
29-
- When using a job container, the container's PATH is used
30-
31-
Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous versions.
17+
- Updated to the node16 runtime by default
18+
- This requires a minimum [Actions Runner](https://github.com/actions/runner/releases/tag/v2.285.0) version of v2.285.0 to run, which is by default available in GHES 3.4 or later.
3219

3320
# Usage
3421

3522
<!-- start usage -->
3623
```yaml
37-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
3825
with:
3926
# Repository name with owner. For example, actions/checkout
4027
# Default: ${{ github.repository }}
@@ -123,23 +110,23 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
123110
## Fetch all history for all tags and branches
124111
125112
```yaml
126-
- uses: actions/checkout@v2
113+
- uses: actions/checkout@v3
127114
with:
128115
fetch-depth: 0
129116
```
130117
131118
## Checkout a different branch
132119
133120
```yaml
134-
- uses: actions/checkout@v2
121+
- uses: actions/checkout@v3
135122
with:
136123
ref: my-branch
137124
```
138125
139126
## Checkout HEAD^
140127
141128
```yaml
142-
- uses: actions/checkout@v2
129+
- uses: actions/checkout@v3
143130
with:
144131
fetch-depth: 2
145132
- run: git checkout HEAD^
@@ -149,12 +136,12 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
149136
150137
```yaml
151138
- name: Checkout
152-
uses: actions/checkout@v2
139+
uses: actions/checkout@v3
153140
with:
154141
path: main
155142

156143
- name: Checkout tools repo
157-
uses: actions/checkout@v2
144+
uses: actions/checkout@v3
158145
with:
159146
repository: my-org/my-tools
160147
path: my-tools
@@ -164,10 +151,10 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
164151
165152
```yaml
166153
- name: Checkout
167-
uses: actions/checkout@v2
154+
uses: actions/checkout@v3
168155

169156
- name: Checkout tools repo
170-
uses: actions/checkout@v2
157+
uses: actions/checkout@v3
171158
with:
172159
repository: my-org/my-tools
173160
path: my-tools
@@ -177,12 +164,12 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
177164
178165
```yaml
179166
- name: Checkout
180-
uses: actions/checkout@v2
167+
uses: actions/checkout@v3
181168
with:
182169
path: main
183170

184171
- name: Checkout private tools
185-
uses: actions/checkout@v2
172+
uses: actions/checkout@v3
186173
with:
187174
repository: my-org/my-private-tools
188175
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
@@ -195,7 +182,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
195182
## Checkout pull request HEAD commit instead of merge commit
196183

197184
```yaml
198-
- uses: actions/checkout@v2
185+
- uses: actions/checkout@v3
199186
with:
200187
ref: ${{ github.event.pull_request.head.sha }}
201188
```
@@ -211,7 +198,7 @@ jobs:
211198
build:
212199
runs-on: ubuntu-latest
213200
steps:
214-
- uses: actions/checkout@v2
201+
- uses: actions/checkout@v3
215202
```
216203

217204
## Push a commit using the built-in token
@@ -222,7 +209,7 @@ jobs:
222209
build:
223210
runs-on: ubuntu-latest
224211
steps:
225-
- uses: actions/checkout@v2
212+
- uses: actions/checkout@v3
226213
- run: |
227214
date > generated.txt
228215
git config user.name github-actions

src/misc/generate-docs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function updateUsage(
120120
}
121121

122122
updateUsage(
123-
'actions/checkout@v2',
123+
'actions/checkout@v3',
124124
path.join(__dirname, '..', '..', 'action.yml'),
125125
path.join(__dirname, '..', '..', 'README.md')
126126
)

0 commit comments

Comments
 (0)