Skip to content

Commit

Permalink
do registry swap for create-env
Browse files Browse the repository at this point in the history
  • Loading branch information
daler committed Feb 17, 2024
1 parent 5298c43 commit 250b47b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,24 +163,33 @@ jobs:
# build-env container. This ensures that when creating environments, we
# use the exact same conda/mamba versions used when building the
# package.
REGISTRY="localhost"
if [ ${{ steps.build-env.outputs.TAG_EXISTS_build-env }} ]; then
REGISTRY="quay.io/bioconda"
fi
CONDA_VERSION=$(
podman run -t localhost/${BUILD_ENV_IMAGE_NAME}:${BIOCONDA_UTILS_VERSION} \
podman run -t $REGISTRY/${BUILD_ENV_IMAGE_NAME}:${BIOCONDA_UTILS_VERSION} \
bash -c "/opt/conda/bin/conda list --export '^conda$'| sed -n 's/=[^=]*$//p'"
)
MAMBA_VERSION=$(
podman run -t localhost/${BUILD_ENV_IMAGE_NAME}:${BIOCONDA_UTILS_VERSION} \
podman run -t $REGISTRY/${BUILD_ENV_IMAGE_NAME}:${BIOCONDA_UTILS_VERSION} \
bash -c "/opt/conda/bin/conda list --export '^mamba$'| sed -n 's/=[^=]*$//p'"
)
# Remove trailing \r with parameter expansion
export CONDA_VERSION=${CONDA_VERSION%$'\r'}
export MAMBA_VERSION=${MAMBA_VERSION%$'\r'}
REGISTRY="localhost"
if [ ${{ steps.base-busybox.outputs.TAG_EXISTS_base-busybox }} ]; then
REGISTRY="quay.io/bioconda"
fi
IMAGE_NAME=$CREATE_ENV_IMAGE_NAME \
IMAGE_DIR=images/create-env \
ARCHS=$ARCHS \
TYPE="create-env" \
BUSYBOX_IMAGE=localhost/$BASE_BUSYBOX_IMAGE_NAME \
BUSYBOX_IMAGE=$REGISTRY/$BASE_BUSYBOX_IMAGE_NAME \
BIOCONDA_UTILS_VERSION=$BIOCONDA_UTILS_VERSION \
./generic_build.bash || [ $? == 64 ]
Expand Down

0 comments on commit 250b47b

Please sign in to comment.