mirror of https://github.com/actions/checkout
Compare commits
4 Commits
d59f260efe
...
a099fe92b8
| Author | SHA1 | Date |
|---|---|---|
|
|
a099fe92b8 | |
|
|
3d3c42e5aa | |
|
|
28802689a1 | |
|
|
d03156b5b8 |
13
CHANGELOG.md
13
CHANGELOG.md
|
|
@ -1,5 +1,18 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v7.0.1
|
||||||
|
* Bump github/codeql-action from 3 to 4 by @dependabot[bot] in https://github.com/actions/checkout/pull/2475
|
||||||
|
* Bump actions/setup-node from 4 to 6 by @dependabot[bot] in https://github.com/actions/checkout/pull/2477
|
||||||
|
* Bump docker/build-push-action from 6.5.0 to 7.2.0 by @dependabot[bot] in https://github.com/actions/checkout/pull/2478
|
||||||
|
* Bump docker/login-action from 3.3.0 to 4.2.0 by @dependabot[bot] in https://github.com/actions/checkout/pull/2479
|
||||||
|
* Bump actions/checkout from 6 to 7 by @dependabot[bot] in https://github.com/actions/checkout/pull/2488
|
||||||
|
* Bump actions/upload-artifact from 4 to 7 by @dependabot[bot] in https://github.com/actions/checkout/pull/2476
|
||||||
|
* eslint 9 by @dependabot[bot] in https://github.com/actions/checkout/pull/2474
|
||||||
|
* Bump the minor-actions-dependencies group with 2 updates by @dependabot[bot] in https://github.com/actions/checkout/pull/2499
|
||||||
|
* skip running unsafe pr check if input is default by @aiqiaoy in https://github.com/actions/checkout/pull/2518
|
||||||
|
* trim only ascii whitespace for branch by @aiqiaoy in https://github.com/actions/checkout/pull/2521
|
||||||
|
* escape values passed to --unset by @aiqiaoy in https://github.com/actions/checkout/pull/2530
|
||||||
|
|
||||||
## v7.0.0
|
## v7.0.0
|
||||||
* Block checking out fork PR for pull_request_target and workflow_run by @aiqiaoy in https://github.com/actions/checkout/pull/2454
|
* Block checking out fork PR for pull_request_target and workflow_run by @aiqiaoy in https://github.com/actions/checkout/pull/2454
|
||||||
* Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by @dependabot[bot] in https://github.com/actions/checkout/pull/2458
|
* Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by @dependabot[bot] in https://github.com/actions/checkout/pull/2458
|
||||||
|
|
|
||||||
18
README.md
18
README.md
|
|
@ -75,6 +75,9 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
|
||||||
# with the local git config, which enables your scripts to run authenticated git
|
# with the local git config, which enables your scripts to run authenticated git
|
||||||
# commands. The post-job step removes the PAT.
|
# commands. The post-job step removes the PAT.
|
||||||
#
|
#
|
||||||
|
# If any of the submodules are private GitHub repos, pass in a PAT with read-access
|
||||||
|
# to them.
|
||||||
|
#
|
||||||
# We recommend using a service account with the least permissions necessary. Also
|
# We recommend using a service account with the least permissions necessary. Also
|
||||||
# when generating a new PAT, select the least scopes necessary.
|
# when generating a new PAT, select the least scopes necessary.
|
||||||
#
|
#
|
||||||
|
|
@ -152,8 +155,8 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
|
||||||
# Whether to checkout submodules: `true` to checkout submodules or `recursive` to
|
# Whether to checkout submodules: `true` to checkout submodules or `recursive` to
|
||||||
# recursively checkout submodules.
|
# recursively checkout submodules.
|
||||||
#
|
#
|
||||||
# When the `ssh-key` input is not provided, SSH URLs beginning with
|
# When neither the `ssh-key` nor the `token` inputs are provided, SSH URLs
|
||||||
# `git@github.com:` are converted to HTTPS.
|
# beginning with `git@github.com:` are converted to HTTPS.
|
||||||
#
|
#
|
||||||
# Default: false
|
# Default: false
|
||||||
submodules: ''
|
submodules: ''
|
||||||
|
|
@ -300,12 +303,19 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
repository: my-org/my-private-tools
|
repository: my-org/my-private-tools
|
||||||
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
|
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains a PAT with read-access to this private repository
|
||||||
path: my-tools
|
path: my-tools
|
||||||
```
|
```
|
||||||
|
|
||||||
> - `${{ github.token }}` is scoped to the current repository, so if you want to checkout a different repository that is private you will need to provide your own [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).
|
## Checkout a repo and its private submodules
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains a PAT with read-access to the private submodules
|
||||||
|
```
|
||||||
|
|
||||||
## Checkout pull request HEAD commit instead of merge commit
|
## Checkout pull request HEAD commit instead of merge commit
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35913,7 +35913,7 @@ class GitCommandManager {
|
||||||
else {
|
else {
|
||||||
args.push(globalConfig ? '--global' : '--local');
|
args.push(globalConfig ? '--global' : '--local');
|
||||||
}
|
}
|
||||||
args.push('--unset', configKey, configValue);
|
args.push('--unset', configKey, regexp_helper_escape(configValue));
|
||||||
const output = await this.execGit(args, true);
|
const output = await this.execGit(args, true);
|
||||||
return output.exitCode === 0;
|
return output.exitCode === 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "checkout",
|
"name": "checkout",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "checkout",
|
"name": "checkout",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^3.0.1",
|
"@actions/core": "^3.0.1",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "checkout",
|
"name": "checkout",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"description": "checkout action",
|
"description": "checkout action",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
|
|
|
||||||
|
|
@ -510,7 +510,7 @@ class GitCommandManager {
|
||||||
} else {
|
} else {
|
||||||
args.push(globalConfig ? '--global' : '--local')
|
args.push(globalConfig ? '--global' : '--local')
|
||||||
}
|
}
|
||||||
args.push('--unset', configKey, configValue)
|
args.push('--unset', configKey, regexpHelper.escape(configValue))
|
||||||
|
|
||||||
const output = await this.execGit(args, true)
|
const output = await this.execGit(args, true)
|
||||||
return output.exitCode === 0
|
return output.exitCode === 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue