#!/bin/bash set -euo pipefail echo "Workspace: $GITHUB_WORKSPACE" DESTINATION_DIR="$1" echo "Destination: $DESTINATION_DIR" # URL="https://github.com/prefix-dev/pixi/releases/latest/download/pixi-x86_64-unknown-linux-musl.tar.gz" URL="https://gitea.psi.ch/python/pixi/releases/download/latest/pixi-x86_64-unknown-linux-musl.tar.gz" ARCHIVE=$(basename "$URL") BINARY=$(echo "$ARCHIVE" | cut -d. -f1 | cut -d- -f1) SCRIPT_PATH=$(dirname "$0") echo "Script path: $SCRIPT_PATH" "$SCRIPT_PATH/download.sh" "$URL" "$SCRIPT_PATH/gitignore.sh" add "$ARCHIVE" || true "$SCRIPT_PATH/gitignore.sh" add "$BINARY" || true # git config user.name "GFA AutoDeploy" # git config user.email "gfa-autodeploy@psi.ch" # enforce glibc version of target system (consoles) instead of runner system export CONDA_OVERRIDE_GLIBC=2.28 chmod +x "$GITHUB_WORKSPACE/pixi" cd "$DESTINATION_DIR" "$GITHUB_WORKSPACE/pixi" init || true "$GITHUB_WORKSPACE/pixi" install --all --no-progress # copy owner group from level above group=$(stat -c '%g' ..) chgrp -R "$group" . # copy permissions from owner to owner group chmod -R g=u . echo "$SCRIPT_PATH/symlink.sh" "$PWD/.pixi/envs" "$PWD/../../envs" # git add .gitattributes .gitignore pixi.lock pixi.toml # git commit -m"automatic commit after install" # git push