Skip to content

Conversation

zengin
Copy link
Contributor

@zengin zengin commented Apr 27, 2022

Adding /github/workspace as a safe directory doesn't cut it for multi repo checkouts even though the repositories are checked out to its subdirectories. Given that commit action is working in the $INPUT_DIRECTORY always, I think my proposed solution should work.

I have tested with multiple repo checkout: https://github.com/microsoftgraph/msgraph-sdk-raptor/runs/6202062937?check_suite_focus=true

I haven't tested with a single repo checkout.

Related issue on our repository:

@RikudouSage
Copy link
Contributor

I'll test it tonight (UTC+1) and either merge it or let you know.

@RikudouSage
Copy link
Contributor

I had some time so I tested it and it fails for single repo, if you bring back the deleted line (git config --global --add safe.directory /github/workspace) it should work for both single and multi repos.

@RikudouSage
Copy link
Contributor

I also added some tests so any new changes should be tested against both single repo and multi repo checkouts.

@RikudouSage RikudouSage merged commit 9c0d224 into actions-x:master Apr 28, 2022
@RikudouSage
Copy link
Contributor

Released (with some fixes of mine) as v6, let me know if it works for you and if you find the tests I added enough for you.

@zengin
Copy link
Contributor Author

zengin commented Apr 29, 2022

@RikudouSage, awesome. Thanks for future-proofing with tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants