Open HealthyPear opened 1 week ago
I think a good solution should be to add a new option to the action where one inputs the path of the existing conda installation and an environment for the runner, like
conda-installation-path:
description: "Path to an existing installation of conda when calling this action"
required: false
default: "~/"
conda-env-runner:
description: "Name of the conda environment to use on the runner"
required: false
default: "showyourwork-runner" # maybe this could be suffixed with the RUNNER_NAME, GITHUB_REPOSITORY and GITHUB_REF_NAME
then, if defined, we use that to activate the base environment, create the environment (which should be cached optionally cached I guess?) and continue.
Discussed in https://github.com/showyourwork/showyourwork/discussions/472
UPDATE
OK I found what is the problem and I think it's something that needs to be changed on the GitHub action side.
The part where showyourwork is installed by the action is performed in
src/conda.js
,where
const conda_paths = ["~/.conda", "~/.condarc", "~/conda_pkgs_dir"];
.The problem is that if you are running on a self-hosted runner as in this case the conda installation might be already present (i.e. the
.conda
folder exists and there is something inside. Though, this something might not be the conda installation but just some user-related info about the existing environments (see https://github.com/conda/conda/issues/5388). In my case it contains only anenvironments.txt
files with the path of all existing environments, but my conda installation is somewhere else.There is nothing in the GitHub Action that deals with an existing conda installation at some path.
Given this I think this should be a proper issue.