mirror of
https://github.com/actions/checkout.git
synced 2025-06-03 14:02:37 +08:00
Compare commits
4 Commits
6a92ef8894
...
46a8a9c4ea
Author | SHA1 | Date | |
---|---|---|---|
|
46a8a9c4ea | ||
|
85e6279cec | ||
|
009b9ae9e4 | ||
|
aea6c75c98 |
@ -311,8 +311,17 @@ jobs:
|
||||
git commit -m "generated"
|
||||
git push
|
||||
```
|
||||
|
||||
*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
|
||||
|
||||
# Recommended permissions
|
||||
|
||||
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:
|
||||
|
||||
```yaml
|
||||
permissions:
|
||||
contents: read
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
|
@ -204,7 +204,7 @@ class GitCommandManager {
|
||||
}
|
||||
|
||||
async checkout(ref: string, startPoint: string): Promise<void> {
|
||||
const args = ['checkout', '--progress', '--force']
|
||||
const args = ['-c advice.detachedHead=false', 'checkout', '--progress', '--force']
|
||||
if (startPoint) {
|
||||
args.push('-B', ref, startPoint)
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user