File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 5
5
env-name :
6
6
type : string
7
7
required : true
8
- description : The spack-env-compliant environment name for the model
8
+ description : The spack-env-compliant model name to remove
9
9
deployment-environment :
10
10
type : string
11
11
required : true
@@ -26,11 +26,19 @@ jobs:
26
26
${{ secrets.HOST_DATA }}
27
27
28
28
- name : Undeploy
29
- # ssh into deployment environment, create and activate the env, install the spack.yaml.
29
+ # ssh into deployment environment, create and activate the env, remove all the unneeded environments
30
30
id : undeploy
31
31
run : |
32
32
ssh ${{ secrets.USER}}@${{ secrets.HOST }} -i ${{ steps.ssh.outputs.private-key-path }} /bin/bash <<'EOT'
33
+ . ${{ vars.SPACK_CONFIG_LOCATION }}/spack-enable.bash
34
+ envs=$(find ${{ vars.SPACK_LOCATION }}/var/spack/environments -type d -name '${{ inputs.env-name }}' -printf '%f ')
33
35
36
+ for env in $envs; do
37
+ spack env activate $env
38
+ spack uninstall --remove --dependents --yes-to-all --all
39
+ spack env rm $env --yes-to-all
40
+ done
41
+ spack gc --yes-to-all
34
42
EOT
35
43
36
44
- name : Undeploy Status Notifier
You can’t perform that action at this time.
0 commit comments