Skip to content

Commit 96640ef

Browse files
committed
github-actionify.sh: set up conda if needed
We check whether conda is needed by the presence of an environment.yml file.
1 parent 028f239 commit 96640ef

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

github-actionify.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ process() {
129129
with:
130130
java-version: '8'
131131
distribution: 'zulu'"
132+
actionSetupConda="name: Set up conda
133+
uses: s-weigand/setup-conda@v1"
132134
actionSetupCI="name: Set up CI environment
133135
run: $ciSetupScript"
134136
actionExecuteBuild="name: Execute the build
@@ -162,6 +164,9 @@ jobs:
162164
- $actionCheckout
163165
- $actionCacheLocalRepo
164166
- $actionSetupJava
167+
EOL
168+
test -f environment.yml && echo " - $actionSetupConda" >>"$tmpFile"
169+
cat >>"$tmpFile" <<EOL
165170
- $actionSetupCI
166171
- $actionExecuteBuild
167172
$actionSecrets
@@ -185,6 +190,9 @@ jobs:
185190
- $actionCheckout
186191
- $actionCacheLocalRepo
187192
- $actionSetupJava
193+
EOL
194+
test -f environment.yml && echo " - $actionSetupConda" >>"$tmpFile"
195+
cat >>"$tmpFile" <<EOL
188196
- $actionSetupCI
189197
- $actionExecuteBuild
190198
EOL

0 commit comments

Comments
 (0)