ENBL-4519 adding output variable to set the repo path

This commit is contained in:
Kenneth Garza 2021-06-29 13:47:27 -04:00
parent e6a424882a
commit 8f88041d21
3 changed files with 6 additions and 0 deletions

View File

@ -71,6 +71,9 @@ inputs:
When the `ssh-key` input is not provided, SSH URLs beginning with `git@github.com:` are
converted to HTTPS.
default: false
outputs:
WORKSPACE_DIR:
description: working directory for the project
runs:
using: node12
main: dist/index.js

1
dist/index.js vendored
View File

@ -1535,6 +1535,7 @@ function getInputs() {
if (!allowParentPath && !(result.repositoryPath + path.sep).startsWith(githubWorkspacePath + path.sep)) {
throw new Error(`Repository path '${result.repositoryPath}' is not under '${githubWorkspacePath}'`);
}
core.setOutput('WORKSPACE_DIR', result.repositoryPath);
// Workflow repository?
const isWorkflowRepository = qualifiedRepository.toUpperCase() ===
`${github.context.repo.owner}/${github.context.repo.repo}`.toUpperCase();

View File

@ -51,6 +51,8 @@ export function getInputs(): IGitSourceSettings {
)
}
core.setOutput('WORKSPACE_DIR', result.repositoryPath)
// Workflow repository?
const isWorkflowRepository =
qualifiedRepository.toUpperCase() ===