Skip to content

Steps are not executed correctly when being ran in image built in previous job (from Github Packages) #24960

Answered by airtower-luna
stex asked this question in Actions
Discussion options

You must be logged in to vote

Your Dockerfile sets this:

Stex:

WORKDIR /app

So /app is where your data ends up. However, when you use a container image for a job (as in your second job) settings like working directory or entrypoint are ignored. The actions runner mounts the job workspace into the container and uses that as the working directory. The logs for the “Initialize containers” step should show you all the Docker arguments that are used to start the container.

If you want to run the things in /app within the container you’ll need to change the directory, either as part of your step or using the working-directory keyword.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Packages Host your dependencies, libraries, and production-ready code, right from your repository Product Feedback
2 participants