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
Copy file name to clipboardExpand all lines: README.md
+2-37Lines changed: 2 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,6 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
143
143
- [Checkout pull request HEAD commit instead of merge commit](#Checkout-pull-request-HEAD-commit-instead-of-merge-commit)
144
144
- [Checkout pull request on closed event](#Checkout-pull-request-on-closed-event)
145
145
- [Push a commit using the built-in token](#Push-a-commit-using-the-built-in-token)
146
-
- [Push a commit to a PR using the built-in token](#Push-a-commit-to-a-PR-using-the-built-in-token)
147
146
148
147
## Fetch only the root files
149
148
@@ -212,7 +211,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
212
211
repository: my-org/my-tools
213
212
path: my-tools
214
213
```
215
-
> - If your secondary repository is private or internal you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private)
214
+
> - If your secondary repository is private you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private)
216
215
217
216
## Checkout multiple repos (nested)
218
217
@@ -226,7 +225,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
226
225
repository: my-org/my-tools
227
226
path: my-tools
228
227
```
229
-
> - If your secondary repository is private or internal you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private)
228
+
> - If your secondary repository is private you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private)
230
229
231
230
## Checkout multiple repos (private)
232
231
@@ -289,40 +288,6 @@ jobs:
289
288
```
290
289
*NOTE:* The user email is `{user.id}+{user.login}@users.noreply.github.com`. See users API: https://api.github.com/users/github-actions%5Bbot%5D
291
290
292
-
## Push a commit to a PR using the built-in token
293
-
294
-
In a pull request trigger, `ref` is required as GitHub Actions checks out in detached HEAD mode, meaning it doesn’t check out your branch by default.
295
-
296
-
```yaml
297
-
on: pull_request
298
-
jobs:
299
-
build:
300
-
runs-on: ubuntu-latest
301
-
steps:
302
-
- uses: actions/checkout@v4
303
-
with:
304
-
ref: ${{ github.head_ref }}
305
-
- run: |
306
-
date > generated.txt
307
-
# Note: the following account information will not work on GHES
*NOTE:* The user email is `{user.id}+{user.login}@users.noreply.github.com`. See users API: https://api.github.com/users/github-actions%5Bbot%5D
316
-
317
-
# Recommended permissions
318
-
319
-
When using the `checkout` action in your GitHub Actions workflow, it is recommended to set the following `GITHUB_TOKEN` permissions to ensure proper functionality, unless alternative auth is provided via the `token` or `ssh-key` inputs:
320
-
321
-
```yaml
322
-
permissions:
323
-
contents: read
324
-
```
325
-
326
291
# License
327
292
328
293
The scripts and documentation in this project are released under the [MIT License](LICENSE)
0 commit comments