Skip to content

Commit

Permalink
Don't enforce that checkout path must be inside of Github Workspace
Browse files Browse the repository at this point in the history
Fixes #327, Fixes #197.
And i also hit this.
  • Loading branch information
LebedevRI committed Nov 14, 2020
1 parent 5a4ac90 commit 9136ce8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
# Default: true
persist-credentials: ''

# Relative path under $GITHUB_WORKSPACE to place the repository
# Path relative to $GITHUB_WORKSPACE to place the repository
path: ''

# Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ inputs:
description: 'Whether to configure the token or SSH key with the local git config'
default: true
path:
description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
description: 'Path relative to $GITHUB_WORKSPACE to place the repository'
clean:
description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
default: true
Expand Down
9 changes: 0 additions & 9 deletions src/input-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,6 @@ export function getInputs(): IGitSourceSettings {
githubWorkspacePath,
result.repositoryPath
)
if (
!(result.repositoryPath + path.sep).startsWith(
githubWorkspacePath + path.sep
)
) {
throw new Error(
`Repository path '${result.repositoryPath}' is not under '${githubWorkspacePath}'`
)
}

// Workflow repository?
const isWorkflowRepository =
Expand Down

0 comments on commit 9136ce8

Please sign in to comment.