mirror of https://github.com/actions/checkout.git
Merge pull request #2 from LexisNexis-GHA-Public/enbl-4519-windows-short-working-dir
ENBL-4519 adding output variable to set the repo path
This commit is contained in:
commit
682fdd90c6
|
@ -71,6 +71,9 @@ inputs:
|
||||||
When the `ssh-key` input is not provided, SSH URLs beginning with `git@github.com:` are
|
When the `ssh-key` input is not provided, SSH URLs beginning with `git@github.com:` are
|
||||||
converted to HTTPS.
|
converted to HTTPS.
|
||||||
default: false
|
default: false
|
||||||
|
outputs:
|
||||||
|
WORKSPACE_DIR:
|
||||||
|
description: working directory for the project
|
||||||
runs:
|
runs:
|
||||||
using: node12
|
using: node12
|
||||||
main: dist/index.js
|
main: dist/index.js
|
||||||
|
|
|
@ -1535,6 +1535,7 @@ function getInputs() {
|
||||||
if (!allowParentPath && !(result.repositoryPath + path.sep).startsWith(githubWorkspacePath + path.sep)) {
|
if (!allowParentPath && !(result.repositoryPath + path.sep).startsWith(githubWorkspacePath + path.sep)) {
|
||||||
throw new Error(`Repository path '${result.repositoryPath}' is not under '${githubWorkspacePath}'`);
|
throw new Error(`Repository path '${result.repositoryPath}' is not under '${githubWorkspacePath}'`);
|
||||||
}
|
}
|
||||||
|
core.setOutput('WORKSPACE_DIR', result.repositoryPath);
|
||||||
// Workflow repository?
|
// Workflow repository?
|
||||||
const isWorkflowRepository = qualifiedRepository.toUpperCase() ===
|
const isWorkflowRepository = qualifiedRepository.toUpperCase() ===
|
||||||
`${github.context.repo.owner}/${github.context.repo.repo}`.toUpperCase();
|
`${github.context.repo.owner}/${github.context.repo.repo}`.toUpperCase();
|
||||||
|
|
|
@ -51,6 +51,8 @@ export function getInputs(): IGitSourceSettings {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
core.setOutput('WORKSPACE_DIR', result.repositoryPath)
|
||||||
|
|
||||||
// Workflow repository?
|
// Workflow repository?
|
||||||
const isWorkflowRepository =
|
const isWorkflowRepository =
|
||||||
qualifiedRepository.toUpperCase() ===
|
qualifiedRepository.toUpperCase() ===
|
||||||
|
|
Loading…
Reference in New Issue