Skip to content

Add a checkout-repository input to support checking out other repositories #119

Description

@andrewb1269

Problem

The Checkout Code step in action.yml doesn't pass a repository to actions/checkout, so the action can only check out the repository the workflow is running in. Workflows that need to check out a different repository (e.g. a private repo from an automation repo) can't do it through this action.

Proposal

  • Add an optional checkout-repository input (owner/repo), defaulting to ${{ github.repository }} so existing callers see no change.
  • Pass it through to actions/checkout as repository.
  • The existing checkout-token input already goes to actions/checkout as token. Confirm and document that it can be used with checkout-repository to authenticate to a private repository.
  • Update README.md with the new input and a cross-repo checkout example.

Acceptance Criteria

  • checkout-repository input added with a backward-compatible default
  • Existing callers that don't set the input behave exactly as before
  • A job can check out a different (private) repository at a given ref using checkout-repository + checkout-ref + checkout-token
  • README updated
  • New release published

Related

  • hashgraph/hedera-consensus-node#49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementEnhancement or request for existing featuregithub_actionsChanges to github actions

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions