1
0
mirror of https://github.com/actions/checkout.git synced 2026-03-07 08:51:46 +08:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Jack Bates
c96ce07416
Merge f787e7d544 into 1af3b93b68 2025-11-21 10:58:49 +01:00
eric sciple
1af3b93b68
update readme/changelog for v6 (#2311) 2025-11-20 10:20:04 -06:00
Jack Bates
f787e7d544
Apply suggestions from code review
Co-authored-by: Usman <akeju00+github@gmail.com>
2023-10-06 06:25:44 -07:00
Jack Bates
d48599a299
Set default user.name and user.email 2021-09-15 09:59:02 -07:00
3 changed files with 19 additions and 1 deletions

View File

@ -1,8 +1,17 @@
# Changelog # Changelog
## V6.0.0
* Persist creds to a separate file by @ericsciple in https://github.com/actions/checkout/pull/2286
* Update README to include Node.js 24 support details and requirements by @salmanmkc in https://github.com/actions/checkout/pull/2248
## V5.0.1
* Port v6 cleanup to v5 by @ericsciple in https://github.com/actions/checkout/pull/2301
## V5.0.0 ## V5.0.0
* Update actions checkout to use node 24 by @salmanmkc in https://github.com/actions/checkout/pull/2226 * Update actions checkout to use node 24 by @salmanmkc in https://github.com/actions/checkout/pull/2226
## V4.3.1
* Port v6 cleanup to v4 by @ericsciple in https://github.com/actions/checkout/pull/2305
## V4.3.0 ## V4.3.0
* docs: update README.md by @motss in https://github.com/actions/checkout/pull/1971 * docs: update README.md by @motss in https://github.com/actions/checkout/pull/1971

View File

@ -1,6 +1,6 @@
[![Build and Test](https://github.com/actions/checkout/actions/workflows/test.yml/badge.svg)](https://github.com/actions/checkout/actions/workflows/test.yml) [![Build and Test](https://github.com/actions/checkout/actions/workflows/test.yml/badge.svg)](https://github.com/actions/checkout/actions/workflows/test.yml)
# Checkout v6-beta # Checkout v6
## What's new ## What's new

View File

@ -1,4 +1,5 @@
import * as core from '@actions/core' import * as core from '@actions/core'
import * as github from '@actions/github'
import * as fsHelper from './fs-helper' import * as fsHelper from './fs-helper'
import * as gitAuthHelper from './git-auth-helper' import * as gitAuthHelper from './git-auth-helper'
import * as gitCommandManager from './git-command-manager' import * as gitCommandManager from './git-command-manager'
@ -274,6 +275,14 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
settings.commit, settings.commit,
settings.githubServerUrl settings.githubServerUrl
) )
// Set default author
if (!await git.configExists('user.name', true)) {
await git.config('user.name', github.context.workflow, true)
}
if (!await git.configExists('user.email', true)) {
await git.config('user.email', 'github-actions@github.com', true)
}
} finally { } finally {
// Remove auth // Remove auth
if (authHelper) { if (authHelper) {