Closed PedroCosta93 closed 1 year ago
@PedroCosta93 Hey there, apologies for the delayed response and that you're running into this issue.
First of all, the internal-chocolatehorse-monorepo/internal-chocolatehorse-monorepo part makes no sense, but that's coming from the github variables so I would say it is ok (My repo doesn't have any duplicate directories).
This seems to be the expected behavior from GitHub when using the GITHUB_WORKSPACE
environment via ${{ github.workspace }}
. From their documentation:
The default working directory on the runner for steps, and the default location of your repository when using the checkout action. For example, /home/runner/work/my-repo-name/my-repo-name.
This would explain the duplicate repository name you're seeing with internal-chocolatehorse-monorepo
.
But then, how is the rest of the path not found ? It's literally the path to the solution inside the repo. It's also worth mentioning that I can build the dockerfile locally.
Just to confirm: does your workflow have a step that clones down your repository using the actions/checkout
GitHub Action? This would be the only reason that the context you provided for appSourcePath
wouldn't exist on the runner.
One other thing that I would note: the dockerfilePath
argument is going to be the relative path to the Dockerfile within the appSourcePath
argument, and includes the name of the Dockerfile too, so you may need to update that value to be AMP.API/Dockerfile
if Dockerfile
is the name of the file and it exists in the /be/AMP-Program/AMP.API
folder.
Please feel free to let me know if you have any additional questions!
@PedroCosta93 Hey there, I'm going to close this issue as there doesn't seem to be any additional action necessary from our side, but please feel free to let me know otherwise and I'd be happy to continue a discussion in the comments and/or re-open the issue if necessary. Thanks!
So I'm trying to automate the deployment of a dotnet 7 web app and I'm having some troubles. I have the following snippet in my workflow file:
So ${{ github.workspace }}/be/AMP-Program is gonna be the path to the solution and AMP.API is the path to the project (where the docker file is).
No matter what i try, there is always some problem with the paths.
This is the docker build logs:
After this i have this error:
unable to prepare context: path "/home/runner/work/internal-chocolatehorse-monorepo/internal-chocolatehorse-monorepo/be/AMP-Program" not found
And after that:
Error: Process completed with exit code 1.
First of all, the internal-chocolatehorse-monorepo/internal-chocolatehorse-monorepo part makes no sense, but that's coming from the github variables so I would say it is ok (My repo doesn't have any duplicate directories). But then, how is the rest of the path not found ? It's literally the path to the solution inside the repo. It's also worth mentioning that I can build the dockerfile locally.
Anyone had this issue ?