mirror of https://github.com/actions/checkout
Compare commits
11 Commits
fae442733e
...
73d1101442
| Author | SHA1 | Date |
|---|---|---|
|
|
73d1101442 | |
|
|
3d3c42e5aa | |
|
|
28802689a1 | |
|
|
f80349a6ad | |
|
|
8af5cbfde0 | |
|
|
d795c2780e | |
|
|
d345e1892f | |
|
|
388793bd97 | |
|
|
4f92610a97 | |
|
|
e67ad3383b | |
|
|
146dd77449 |
|
|
@ -29,6 +29,8 @@ jobs:
|
||||||
run: __test__/verify-no-unstaged-changes.sh
|
run: __test__/verify-no-unstaged-changes.sh
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
env:
|
||||||
|
main_path: main_path_test
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
runs-on: [ubuntu-latest, macos-latest, windows-latest]
|
runs-on: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
@ -62,6 +64,16 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: __test__/verify-clean.sh
|
run: __test__/verify-clean.sh
|
||||||
|
|
||||||
|
# Use environment variable as path
|
||||||
|
- name: Environment path test
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
ref: test-data/v2/basic
|
||||||
|
path: ${{ env.main_path }}
|
||||||
|
- name: Verify environment path test
|
||||||
|
shell: bash
|
||||||
|
run: __test__/verify-environment-path.sh
|
||||||
|
|
||||||
# Side by side
|
# Side by side
|
||||||
- name: Checkout side by side 1
|
- name: Checkout side by side 1
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
|
||||||
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
|
||||||
|
|
|
||||||
14
README.md
14
README.md
|
|
@ -113,7 +113,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
|
||||||
# Default: true
|
# Default: true
|
||||||
persist-credentials: ''
|
persist-credentials: ''
|
||||||
|
|
||||||
# Relative path under $GITHUB_WORKSPACE to place the repository
|
# Relative or absolute path under $GITHUB_WORKSPACE to place the repository
|
||||||
path: ''
|
path: ''
|
||||||
|
|
||||||
# Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching
|
# Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching
|
||||||
|
|
@ -274,6 +274,18 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
|
||||||
```
|
```
|
||||||
> - 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)
|
> - 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)
|
||||||
|
|
||||||
|
## Checkout repo with a environment based path
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
env:
|
||||||
|
main_path: ${{ github.workspace }}/main
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.main_path }}
|
||||||
|
```
|
||||||
|
|
||||||
## Checkout multiple repos (nested)
|
## Checkout multiple repos (nested)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! -f "./main_path_test/basic-file.txt" ]; then
|
||||||
|
echo "Expected file does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
@ -53,7 +53,7 @@ inputs:
|
||||||
description: 'Whether to configure the token or SSH key with the local git config'
|
description: 'Whether to configure the token or SSH key with the local git config'
|
||||||
default: true
|
default: true
|
||||||
path:
|
path:
|
||||||
description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
|
description: 'Relative or absolute path under $GITHUB_WORKSPACE to place the repository'
|
||||||
clean:
|
clean:
|
||||||
description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
|
description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
|
||||||
default: true
|
default: true
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ We want to take this opportunity to make behavioral changes, from v1. This docum
|
||||||
description: 'Whether to configure the token or SSH key with the local git config'
|
description: 'Whether to configure the token or SSH key with the local git config'
|
||||||
default: true
|
default: true
|
||||||
path:
|
path:
|
||||||
description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
|
description: 'Relative or absolute path under $GITHUB_WORKSPACE to place the repository'
|
||||||
clean:
|
clean:
|
||||||
description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
|
description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
|
||||||
default: true
|
default: true
|
||||||
|
|
|
||||||
|
|
@ -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