checkout
checkout copied to clipboard
Add output variable to return path where repository has been cloned
Cloning location sometimes can be confusing and unpredictable and github.workspace not always works in all scenarios, e.g. #785 or when using reusable workflows (workflow call).
So I'm proposing definition of output variable which will return value of path where the repository was cloned.
Example usage:
on:
workflow_call:
# Map the workflow outputs to job outputs
outputs:
checkout_path:
value: ${{ jobs.example_job.outputs.checkout_path }}
jobs:
example_job:
runs-on: ubuntu-latest
outputs:
checkout_path: ${{ steps.checkout_path.outputs.checkout_path }}
steps:
- id: checkout_path
uses: actions/checkout@v4