mirror of
https://github.com/actions/checkout.git
synced 2026-03-03 03:07:32 +08:00
Compare commits
1 Commits
e10bd95aa5
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b0793cc05 |
@@ -17,4 +17,4 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Publish
|
||||
id: publish
|
||||
uses: actions/publish-immutable-action@0.0.3
|
||||
uses: actions/publish-immutable-action@v0.0.4
|
||||
|
||||
2
.github/workflows/update-test-ubuntu-git.yml
vendored
2
.github/workflows/update-test-ubuntu-git.yml
vendored
@@ -48,7 +48,7 @@ jobs:
|
||||
|
||||
# Use `docker/build-push-action` to build (and optionally publish) the image.
|
||||
- name: Build Docker Image (with optional Push)
|
||||
uses: docker/build-push-action@v6.5.0
|
||||
uses: docker/build-push-action@v6.10.0
|
||||
with:
|
||||
context: .
|
||||
file: images/test-ubuntu-git.Dockerfile
|
||||
|
||||
13
README.md
13
README.md
@@ -74,10 +74,6 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
|
||||
# Relative path under $GITHUB_WORKSPACE to place the repository
|
||||
path: ''
|
||||
|
||||
# Allow the checked-out repository to be placed outside of the workspace
|
||||
# Default: false
|
||||
allow-path-outside-workspace: ''
|
||||
|
||||
# Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching
|
||||
# Default: true
|
||||
clean: ''
|
||||
@@ -315,17 +311,8 @@ 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
|
||||
|
||||
|
||||
@@ -54,10 +54,6 @@ inputs:
|
||||
default: true
|
||||
path:
|
||||
description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
|
||||
allow-path-outside-workspace:
|
||||
description: Allow the checked-out repository to be placed outside of the workspace.
|
||||
default: false
|
||||
required: false
|
||||
clean:
|
||||
description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
|
||||
default: true
|
||||
|
||||
3
dist/index.js
vendored
3
dist/index.js
vendored
@@ -1737,8 +1737,7 @@ function getInputs() {
|
||||
// Repository path
|
||||
result.repositoryPath = core.getInput('path') || '.';
|
||||
result.repositoryPath = path.resolve(githubWorkspacePath, result.repositoryPath);
|
||||
if (!core.getInput('allow-path-outside-workspace') &&
|
||||
!(result.repositoryPath + path.sep).startsWith(githubWorkspacePath + path.sep)) {
|
||||
if (!(result.repositoryPath + path.sep).startsWith(githubWorkspacePath + path.sep)) {
|
||||
throw new Error(`Repository path '${result.repositoryPath}' is not under '${githubWorkspacePath}'`);
|
||||
}
|
||||
// Workflow repository?
|
||||
|
||||
@@ -42,7 +42,6 @@ export async function getInputs(): Promise<IGitSourceSettings> {
|
||||
result.repositoryPath
|
||||
)
|
||||
if (
|
||||
!core.getInput('allow-path-outside-workspace') &&
|
||||
!(result.repositoryPath + path.sep).startsWith(
|
||||
githubWorkspacePath + path.sep
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user