Skip to content

Download Files/Folders from another Repository #1525

Open
@steven-pribilinskiy

Description

@steven-pribilinskiy

I have a very basic scenario.

      - name: Checkout main repo
        uses: actions/checkout@v4
        with:
          token: ${{ ... }}

      - name: Checkout single file from another repo
        uses: actions/checkout@v4
        with:
          repository: company/repo-name
          ref: main
          token: ${{ ... }}
          clean: false
          sparse-checkout: scripts/some-script.ts
          sparse-checkout-cone-mode: false

And in the output (and using ls) I can see that contents of the repo is always deleted

Run actions/checkout@v4
Syncing repository: company/repo-name
...
Deleting the contents of '/home/runner/work/repo-name/repo-name'

I believe it is a bug or design flaw for this action and missing documentation on this behaviour.

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