You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This action checks-out your repository under `$GITHUB_WORKSPACE`, so your workflow can access it.
8
8
@@ -14,27 +14,14 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl
14
14
15
15
# What's new
16
16
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.
32
19
33
20
# Usage
34
21
35
22
<!-- start usage -->
36
23
```yaml
37
-
- uses: actions/checkout@v2
24
+
- uses: actions/checkout@v3
38
25
with:
39
26
# Repository name with owner. For example, actions/checkout
40
27
# Default: ${{ github.repository }}
@@ -123,23 +110,23 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
123
110
## Fetch all history for all tags and branches
124
111
125
112
```yaml
126
-
- uses: actions/checkout@v2
113
+
- uses: actions/checkout@v3
127
114
with:
128
115
fetch-depth: 0
129
116
```
130
117
131
118
## Checkout a different branch
132
119
133
120
```yaml
134
-
- uses: actions/checkout@v2
121
+
- uses: actions/checkout@v3
135
122
with:
136
123
ref: my-branch
137
124
```
138
125
139
126
## Checkout HEAD^
140
127
141
128
```yaml
142
-
- uses: actions/checkout@v2
129
+
- uses: actions/checkout@v3
143
130
with:
144
131
fetch-depth: 2
145
132
- run: git checkout HEAD^
@@ -149,12 +136,12 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
149
136
150
137
```yaml
151
138
- name: Checkout
152
-
uses: actions/checkout@v2
139
+
uses: actions/checkout@v3
153
140
with:
154
141
path: main
155
142
156
143
- name: Checkout tools repo
157
-
uses: actions/checkout@v2
144
+
uses: actions/checkout@v3
158
145
with:
159
146
repository: my-org/my-tools
160
147
path: my-tools
@@ -164,10 +151,10 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
164
151
165
152
```yaml
166
153
- name: Checkout
167
-
uses: actions/checkout@v2
154
+
uses: actions/checkout@v3
168
155
169
156
- name: Checkout tools repo
170
-
uses: actions/checkout@v2
157
+
uses: actions/checkout@v3
171
158
with:
172
159
repository: my-org/my-tools
173
160
path: my-tools
@@ -177,12 +164,12 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
177
164
178
165
```yaml
179
166
- name: Checkout
180
-
uses: actions/checkout@v2
167
+
uses: actions/checkout@v3
181
168
with:
182
169
path: main
183
170
184
171
- name: Checkout private tools
185
-
uses: actions/checkout@v2
172
+
uses: actions/checkout@v3
186
173
with:
187
174
repository: my-org/my-private-tools
188
175
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
195
182
## Checkout pull request HEAD commit instead of merge commit
0 commit comments