Include date in conda env grep to prevent miss on date-change
Currently the grep expression used to filter existing conda envs only
use ${{ env.conda-env-name-no-time }}, whereas the full env name
includes the date. This results in false hits when jobs in a single
workflow runs across multiple dates.
This commit is contained in:
4
.github/actions/create-conda-env/action.yml
vendored
4
.github/actions/create-conda-env/action.yml
vendored
@@ -5,8 +5,8 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Create conda environments
|
- name: Create conda environments
|
||||||
run: |
|
run: |
|
||||||
if conda env list | grep -q "envs/${{ env.conda-env-name-no-time }}"; then
|
if conda env list | grep -q "envs/${{ env.conda-env-name-no-time }}-$(date --date \"${{ env.workflow-timestamp }}\" +%Y%m%d)"; then
|
||||||
echo "Using pre-existing conda environments with prefix ${{ env.conda-env-name-no-time }}"
|
echo "Using pre-existing conda environments with prefix ${{ env.conda-env-name-no-time }}-$(date --date \"${{ env.workflow-timestamp }}\" +%Y%m%d)"
|
||||||
else
|
else
|
||||||
echo "Creating a conda environment for each toolchain with the toolchain installed"
|
echo "Creating a conda environment for each toolchain with the toolchain installed"
|
||||||
conda activate base
|
conda activate base
|
||||||
|
|||||||
Reference in New Issue
Block a user