Skip to content

Commit

Permalink
Fix #60: channels both in action arguments and environment file (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashaag authored Jun 11, 2022
1 parent de032af commit 4ec73b7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test_options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
environment-file: [false, environment.yml]
steps:
- uses: actions/checkout@v2

- name: install mamba
uses: ./
with:
environment-file: false
environment-file: ${{ matrix.environment-file }}
environment-name: test-channels
extra-specs: |
xtensor
Expand Down
5 changes: 4 additions & 1 deletion dist/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ always_yes: true
show_channel_urls: true
channel_priority: strict
`
const channels = inputs.channels + (extraChannels || []).join(', ')
const channels =
inputs.channels && extraChannels
? inputs.channels + ',' + extraChannels.join(', ')
: inputs.channels || extraChannels?.join(', ')
if (channels) {
condarcOpts += `channels: [${channels}]`
}
Expand Down

0 comments on commit 4ec73b7

Please sign in to comment.