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 2 commits
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
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() ===