mirror of
https://github.com/actions/checkout.git
synced 2025-06-05 07:32:37 +08:00
Compare commits
4 Commits
3ebe9c9fd6
...
b0f61e0c23
Author | SHA1 | Date | |
---|---|---|---|
|
b0f61e0c23 | ||
|
85e6279cec | ||
|
009b9ae9e4 | ||
|
401851faf5 |
@ -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
|
||||
|
||||
|
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -711,7 +711,11 @@ class GitCommandManager {
|
||||
}
|
||||
init() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.execGit(['init', this.workingDirectory]);
|
||||
yield this.execGit([
|
||||
'init',
|
||||
'--initial-branch=silence_warning_about_default_branch',
|
||||
this.workingDirectory
|
||||
]);
|
||||
});
|
||||
}
|
||||
isDetached() {
|
||||
|
@ -328,7 +328,11 @@ class GitCommandManager {
|
||||
}
|
||||
|
||||
async init(): Promise<void> {
|
||||
await this.execGit(['init', this.workingDirectory])
|
||||
await this.execGit([
|
||||
'init',
|
||||
'--initial-branch=silence_warning_about_default_branch',
|
||||
this.workingDirectory
|
||||
])
|
||||
}
|
||||
|
||||
async isDetached(): Promise<boolean> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user