Skip to content

Checkout Specific Folder/Directory/Path within GitHub Repository #483

Open
@NickLiffen

Description

@NickLiffen

👋

Let's say I have repositoryA that has a high-level folder structure of:

- .github
- actions
- docs
- tests
readme.md
...

I also have a repository called repositoryB. From repositoryB, I am trying to checkout repositoryA. I have that working by something like the below:

      - name: Checkout Central Actions Repo
        uses: actions/checkout@v2
        with:
          repository: ${{org}}/repositoryA
          ref: main
          token: ${{ secrets.token }}
          persist-credentials: false
          path: ./github-app-jwt-action

This works and checks out the whole repository. I am looking for a way to only checkout the actions
directory from repositoryA, vs the whole repository. I was thinking something like this would work:

      - name: Checkout Central Actions Repo
        uses: actions/checkout@v2
        with:
          repository: ${{org}}/repositoryA
          ref: main
          token: ${{ secrets.token }}
          persist-credentials: false
          path: ./github-app-jwt-action
          dir: ./actions

This obviously isn't possible, but I wondered if there was another way around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions