mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #2724] Intermittent or Inconsistent File Access within act-Managed Docker Container on Windows for dotnet pack after actions/checkout #1233
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1233
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ulfbou on GitHub (Apr 8, 2025).
Original GitHub issue: https://github.com/nektos/act/issues/2724
Bug report info
Command used with act
Describe issue
We are unable to successfully execute the
dotnet packcommand within a Linux-based Docker container managed byacton your Windows host. The error consistently indicates that the project file (Async.Locks.csproj) cannot be found, even after steps within the same job have successfully listed the directory containing the file and even navigated into that directory. This suggests an inconsistency or problem with howacton Windows handles the volume-mounted filesystem and the execution context of commands within the container.Detailed Observations and Steps Taken:
Workflow Goal: The objective is to locally test a GitHub Actions workflow that checks out .NET code and builds a NuGet package using the
.NET SDKwithin a Docker container (ulfbou/dotnet-node:9.0).Local Environment: The testing is being performed on a Windows machine using
act. Docker Desktop is the underlying containerization platform.Initial Attempts: Running the workflow directly resulted in the
dotnet packcommand failing with the errorMSBUILD : error MSB1009: Project file does not exist. Switch: Async.Locks.csproj.Verification of File Existence: We added steps to the workflow to list the contents of the
/github/workspacedirectory (where the code is checked out via volume mount). Thesels -lcommands confirmed that theSrc/Async.Locksdirectory and theAsync.Locks.csprojfile were indeed present within the container after theactions/checkoutstep.Attempts with
working-directory: We tried setting theworking-directoryfor thedotnet packstep to various locations (/github/workspace,/github/workspace/Src/Async.Locks) in an attempt to provide the correct context for the command to find the project file. These attempts were unsuccessful.Basic Volume Mount Test: We created a separate, simplified workflow that mounted your repository to a different location within a basic
ubuntu:latestcontainer. We were able to successfully list the contents of the mounted directory, confirming that basic volume mounting from the Windows host to the Linux container works withact.Explicit Navigation and Debugging: We added steps to explicitly navigate into the project directory (
/github/workspace/Src/Async.Locks) usingcdand verified the current working directory usingpwd. The output showed that thecdcommand succeeded, and the working directory was correctly set. However, thedotnet packcommand immediately following this still failed to find the project file."chdir failed" Error: In some iterations, we encountered the error
OCI runtime exec failed: exec failed: unable to start container process: chdir to cwd ("/github/workspace/Src/Async.Locks") set in config.json failed: no such file or directory: unknown. This error indicates that the container runtime itself was unable to change to the specified working directory for thedotnet packstep, even though a precedingcdcommand in a separate step to the same location was successful.Relevance of
actIssue Tracker: We reviewed issue #107 on theactGitHub repository, which, while related to a "command not found" error, highlights potential inconsistencies or limitations in howactmanages the container environment, particularly concerning the filesystem and execution context.Conclusion Based on the Evidence:
The consistent failure of
dotnet packto find the project file, even after verifying its existence and successfully navigating to its directory within the container, along with the "chdir failed" error, strongly suggests that there is an underlying issue with howacton your Windows system handles the interaction between the volume-mounted filesystem and the execution of commands in subsequentdocker execcalls within the same job. The container's view or accessibility of the filesystem appears to be inconsistent or broken in a way that affectsdotnet's ability to locate the project file, despite the shell being able to navigate to the correct location.Therefore, further attempts to resolve this through modifications to the GitHub Actions workflow YAML are unlikely to be successful. The problem seems to be specific to the
actenvironment on Windows. The most effective next step is to investigate theactissue tracker for similar reports, known limitations, or specific configuration requirements related to volume mounts and working directories on Windows. You may also need to consider alternative local testing strategies ifactcontinues to exhibit this behavior.Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
acton a Windows host with Docker Desktop, interacting with Linux containers and volume-mounted Windows files.working-directoryin thedotnet packstep and even successfully navigating to the project directory in a preceding step does not resolve the "project file not found" error.actmanages the filesystem context or how the Docker container interacts with the volume-mounted files between differentdocker execcalls within the sameactjob on Windows.