Gray Wolf Corporation

github action with additional repos

I refactored a chunk of code from an existing solution into a new project and created a new repository. Everything worked fine locally, but the github actions failed for multiple reasons.

One reason was that the new relative project references needed to be configured in the yml.

Another was that GITHUB_TOKEN does not appear to have permissions outside of the repository where the action is taking place.

To resolve, I created a Personal Access Token and added it as a secret. I also checked out the main project to a subdirectory (./app), so that the other repo could be checked out to the "root" directory.

I also had to set the working-directory for the build and publish commands. Otherwise, they would have run in the root folder.

After checking out the repos, the root folder structure looked like this:

Run dir *
GWC.HttpRequest.Library:
BearerToken.cs			HttpRequestService.cs
FileContent.cs			HttpResponseExtensions.cs
GWC.HttpRequest.Library.csproj	IHttpRequestService.cs
GWC.HttpRequest.Library.sln	JsonContent.cs
HttpEnum.cs			PatchContent.cs
HttpRequestBuilder.cs		RestConfigDto.cs

app:
GWC.Blazor.Library  GWC.Blazor.WebApp  GWCBlazor.sln
github action with additional repos
An unhandled error has occurred. Reload 🗙