dmnemec / copy_file_to_another_repo_action

This GitHub Action copies a file from the current repository to a location in another repository
Apache License 2.0
182 stars 201 forks source link

Fails on cp: target '/tmp/tmp.ahLafm/monorepo-builder' is not a directory #8

Closed TomasVotruba closed 3 years ago

TomasVotruba commented 3 years ago

I'm trying to publish full directory (not just single file) to remote repository.

On this Github Actions setup: https://github.com/symplify/symplify/pull/2437/files#diff-c065bcdb0c59642b8340c2b26d8ab09cc27d3ee7859a3575f916a6497cb7a17fR39

            -
                name: Push To Remote Repository
                uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
                env:
                    API_TOKEN_GITHUB: ${{ secrets.ACCESS_TOKEN }}
                with:
                    source_file: packages-scoped/${{ matrix.scoped_package }}
                    destination_repo: symplify/${{ matrix.scoped_package }}-prefixed
                    user_email: 'tomas.vot@gmail.com'
                    user_name: 'TomasVotruba'

I got this fail: https://github.com/symplify/symplify/pull/2437/checks?check_run_id=1341352063

image


Any tips what I'm doing wrong?

Thank you

dmnemec commented 3 years ago

Try adding a / or /* to the end of source_file. I originally wrote this action to copy directories and it uses the cp command so whatever format works for cp should work for this.

TomasVotruba commented 3 years ago

Hi, thanks for the reply.

In the end I switched to custom GitHub Action, that handles pushing subdirectory to another repository: https://github.com/symplify/monorepo-split-github-action