Skip to content
This repository was archived by the owner on Jul 16, 2020. It is now read-only.
This repository was archived by the owner on Jul 16, 2020. It is now read-only.

Path fix for github docker actions in Entrypoint #16

@katilp

Description

@katilp

The github docker actions run docker run with the following

/usr/bin/docker run --name c27d318565180a5ce950be55cfcc7216d9c1a4_1ad10e --label c27d31 --workdir /github/workspace --rm -e INPUT_FILE-NAME -e INPUT_CMSSW_VERSION -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/github-action-test/github-action-test":"/github/workspace" c27d31:8565180a5ce950be55cfcc7216d9c1a4

In consequence, Entrypoint starts in a wrong directory (in /github/workspace owned by cmsinst instead of /home/cmsusr) for the CMSSW release area build and gives:

Setting up CMSSW_4_2_8
cannot make directory CMSSW_4_2_8 Permission denied

If you add
cd /home/cmsusr at the beginning of Entrypoint it would work also with github docker actions.

Furthermore, when producing artifacts, github actions/upload-artifact looks for the file to upload in that same volume
-v "/home/runner/work/github-action-test/github-action-test":"/github/workspace"
but as it comes under ownership of cmsinst, chown is needed before copying there can be done.
That's fine, but I wonder if there's a better solution.

I could not figure out any way of changing the default volumes in the docker run command in github actions.

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