checkout icon indicating copy to clipboard operation
checkout copied to clipboard

Add output variable to return path where repository has been cloned

Open kenorb opened this issue 1 year ago • 0 comments

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

kenorb avatar Feb 11 '24 20:02 kenorb