Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow relative paths to be parent of workspace path #548

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ENBL-4519 adding output variable to set the repo path
  • Loading branch information
garkenxian committed Jun 29, 2021
commit 8f88041d212b25dac1f596fae86c4f474d0052c6
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -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();
2 changes: 2 additions & 0 deletions src/input-helper.ts
Original file line number Diff line number Diff line change
@@ -51,6 +51,8 @@ export function getInputs(): IGitSourceSettings {
)
}

core.setOutput('WORKSPACE_DIR', result.repositoryPath)

// Workflow repository?
const isWorkflowRepository =
qualifiedRepository.toUpperCase() ===