Skip to content

Unspecified USER in Dockerfile causes checkouts with 'Permission Denied' #53

Description

@0xjmux

Hi, I'm trying to use this to build a package with pyinstaller on a self-hosted runner but am running into some issues.

Since the Dockerfile doesn't specify a USER, the commands in entrypoint.sh are run as root, causing the built artifacts to be owned by root:root (See this discussion post).

This is likely not much of an issue on Github hosted runners since the environment is re-provisioned, but on a self hosted runner after the first run of this action the checkout step fails with:

   warning: failed to remove [REPO]/dist/windows: Permission denied
Warning: Unable to clean or reset the repository. The repository will be recreated instead.
Deleting the contents of '/home/jenkins/gha/w1/w/[REPO]
Error: File was unable to be removed Error: EACCES: permission denied, rmdir '/home/jenkins/gha/w1/w/[REPO]/dist/windows'

Because the built artifacts are in the repo directory, this also causes linux builds of the same source to fail. Specifying a USER in the Dockerfile would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions