You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: publish/action.yaml
+14-12Lines changed: 14 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -40,19 +40,21 @@ runs:
40
40
id: get_command
41
41
shell: bash
42
42
run: |
43
-
# if `anaconda` command is available, use it directly; otherwise, check for `pixi` and install `anaconda-client` if needed
44
-
if command -v anaconda &> /dev/null; then
45
-
echo "'anaconda' command found. Using it for upload."
46
-
echo "CMD=anaconda" >> $GITHUB_OUTPUT
43
+
if command -v anaconda &>/dev/null; then
44
+
echo "'anaconda' command is available. Using it for upload."
45
+
export CMD="anaconda"
46
+
elif pixi run anaconda --version &>/dev/null; then
47
+
echo "anaconda command is available via pixi. Using 'pixi run anaconda' for upload."
48
+
export CMD="pixi run anaconda"
47
49
else
48
-
if command -v pixi &> /dev/null; then
49
-
echo "'pixi' command found. Installing anaconda-client via pixi..."
50
-
pixi global install anaconda-client
51
-
echo "CMD='pixi run anaconda'" >> $GITHUB_OUTPUT
52
-
else
53
-
echo "Error: Neither 'anaconda' nor 'pixi' command found. Please install the Anaconda Client or Pixi CLI to use this action."
54
-
exit 1
55
-
fi
50
+
echo "anaconda command is not available via pixi. Checking for 'anaconda' command..."
51
+
if command -v anaconda &>/dev/null; then
52
+
echo "'anaconda' command found. Using it for upload."
53
+
export CMD="anaconda"
54
+
else
55
+
echo "Neither 'anaconda' command nor 'pixi run anaconda' is available. Please ensure that anaconda-client is installed and available in PATH or via pixi."
0 commit comments