s0 / git-publish-subdir-action

GitHub Action to push a subdirectory as a branch to any git repo (e.g. for GitHub Pages)
https://github.com/marketplace/actions/push-git-subdirectory-as-branch
MIT License
208 stars 36 forks source link

File name with dot like pdr.update can't coplete action #73

Closed kivannc closed 2 years ago

kivannc commented 2 years ago

I have two repo first one named pdr and second one named pdr.update. First one can complte action with no problem but pdr.update fails on publish-subdir-action

Error log is below for repo named pdr.update

Run s0/git-publish-subdir-action@develop Cloning into '/tmp/git-publish-subdir-action-33X3B5/repo'...

From https://github.com/3EIndustrialEngineering/pdr.update

[info] Checking if branch raspberrypi exists already

data raspberrypi

Switched to branch 'raspberrypi'

[info] Updating branch raspberrypi

[info] Removing all files from target branch

[info] Copying all files from /home/runner/work/pdr.update/pdr.update/raspberrypi

cp: cannot overwrite directory './pdr.update' with non-directory

Error: Process exited with code: 1: cp: cannot overwrite directory './pdr.update' with non-directory

at ChildProcess.<anonymous> (/home/runner/work/_actions/s0/git-publish-subdir-action/develop/action/dist/index.js:1263[9](https://github.com/3EIndustrialEngineering/pdr.update/runs/6003528746?check_suite_focus=true#step:7:9):20)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:[10](https://github.com/3EIndustrialEngineering/pdr.update/runs/6003528746?check_suite_focus=true#step:7:10)22:16)
at Socket.<anonymous> (internal/child_process.js:444:[11](https://github.com/3EIndustrialEngineering/pdr.update/runs/6003528746?check_suite_focus=true#step:7:11))
at Socket.emit (events.js:314:20)
at Pipe.<anonymous> (net.js:675:[12](https://github.com/3EIndustrialEngineering/pdr.update/runs/6003528746?check_suite_focus=true#step:7:12))

Successfully completed action repo named pdr

Run s0/git-publish-subdir-action@develop Cloning into '/tmp/git-publish-subdir-action-Y5M0xn/repo'...

From https://github.com/3EIndustrialEngineering/pdr

[info] Checking if branch raspberrypi exists already

data raspberrypi

Switched to branch 'raspberrypi'

[info] Updating branch raspberrypi

[info] Removing all files from target branch

[info] Copying all files from /home/runner/work/pdr/pdr/raspberrypi

[info] Pushing

To https://github.com/3EIndustrialEngineering/pdr.git f6fb1a6..e70e09d raspberrypi -> raspberrypi

kivannc commented 2 years ago

I've cleared all folders in raspberrypi branch and then it worked.