-
Notifications
You must be signed in to change notification settings - Fork 20
/
action.yml
238 lines (233 loc) · 10.7 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
name: "provision-with-micromamba"
description: "provision a CI instance using micromamba"
branding:
icon: "chevrons-right"
color: "green"
inputs:
# Basic options
environment-file:
description: >-
Required.
Path to the `environment.yml` or `.lock` file for the Conda environment OR `false`.
If `false`, only *extra-specs* will be considered and you should provide *channels*.
If both *environment-file* and *extra-specs* are empty,
no environment will be created (only `micromamba` will be installed).
See the [Conda documentation](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file)
for more information.
required: true
default: environment.yml
environment-name:
description: >-
The name of the Conda environment.
Defaults to name from the `environment.yml` file set with *environment-file*.
Required if *environment-file* is a `.lock` file or `false`,
[unless](https://github.com/mamba-org/provision-with-micromamba/issues/54)
both *environment-file* and *extra-specs* are empty.
micromamba-version:
description: >-
Version of micromamba to use, eg. `"0.20"`.
See <https://github.com/mamba-org/mamba/releases/> for a list of releases.
required: true
default: latest
extra-specs:
description: |
Additional specifications (packages) to install.
Pretty useful when using matrix builds to pin versions of a test/run dependency.
For multiple packages, use multiline syntax:
```yaml
extra-specs: |
python=3.10
xtensor
```
Note that selectors
(e.g. `sel(linux): my-linux-package`, `sel(osx): my-osx-package`, `sel(win): my-win-package`)
are available.
channels:
description: >-
Comma separated list of channels to use in order of priority (eg., `conda-forge,my-private-channel`)
condarc-file:
description: >-
Path to a `.condarc` file to use. See the [Conda documentation](https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/)
for more information.
channel-priority:
description: >-
Channel priority to use. One of `"strict"`, `"flexible"`, and `"disabled"`.
See https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html#strict-channel-priority
for more information.
required: true
default: strict
# Caching options
cache-downloads:
description: >-
If `true`, cache downloaded packages across calls to the provision-with-micromamba action.
Cache invalidation can be controlled using the *cache-downloads-key* option.
required: true
default: false
cache-downloads-key:
description: >-
Custom download cache key used with `cache-downloads: true`.
The default download cache key will invalidate the cache once per day.
cache-env:
description: >-
If `true`, cache installed environments across calls to the provision-with-micromamba action.
Cache invalidation can be controlled using the *cache-env-key* option.
required: true
default: false
cache-env-key:
description: >-
Custom environment cache key used with `cache-env: true`.
With the default environment cache key, separate caches will be created for each
operating system (eg., Linux) and platform (eg., x64) and day (eg., 2022-01-31),
and the cache will be invalidated whenever the contents of *environment-file* or *extra-specs* change.
# cache-env-always-update:
# description: >-
# (Not implemented)
# If 'true', run 'micromamba update' even if the environment was restored from cache
# to make sure your environment is always up-to-date.
# required: true
# default: false
# Advanced options
log-level:
description: >-
Micromamba log level to use.
One of `"trace"`, `"debug"`, `"info"`, `"warning"`, `"error"`, `"critical"`, `"off"`.
default: warning
installer-url:
description: >-
Base URL to fetch Micromamba from. Files will be downloaded from
`<base url>/<platform>/<version>`, eg. <https://micro.mamba.pm/api/micromamba/linux-64/latest>.
required: true
default: https://micro.mamba.pm/api/micromamba
condarc-options:
description: |-
More options to append to `.condarc`. Must be a string of valid YAML:
```yaml
condarc-options: |
proxy_servers:
http: ...
```
post-deinit:
description: |-
Attempt to undo any modifications done to `.bashrc` etc. in the post action of the workflow.
This is useful for self-hosted runners that keep the state of the system.
One of `"auto"`, `"true"` or `"false"`.
If set to `"auto"`, behaves like `"true"` if the micromamba version used supports `micromamba shell deinit` (i.e. `micromamba>=0.25.0`).
required: true
default: auto
# setup-miniconda options that are not (yet) supported:
#
# activate-environment:
# description:
# "Environment name (or path) to activate on all shells. Default is `test`
# which will be created in `$CONDA/envs/test`. If an empty string is used,
# no environment is activated by default (For `base` activation see the
# `auto-activate-base` option). If the environment does not exist, it will
# be created and activated. If `environment-file` is used and you want that
# to be the environment used, you need to explicitly provide the name of
# that environment on `activate-environment`. If using sh/bash/cmd.exe
# shells please read the IMPORTANT! section on the README.md! to properly
# activate conda environments on these shells."
# required: false
# default: "test"
# channel-alias:
# description:
# "Conda configuration. Whenever you use the -c or --channel flag to give
# conda a channel name that is not a URL, conda prepends the channel_alias
# to the name that it was given. The default channel_alias is
# https://conda.anaconda.org. See
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#set-a-channel-alias-channel-alias
# for more information."
# required: false
# default: ""
# python-version:
# description:
# 'Exact version of a Python version to use on "activate-environment". If
# provided, this will be installed before the "environment-file". See
# https://anaconda.org/anaconda/python for available "python" versions.'
# required: false
# default: ""
# add-anaconda-token:
# description:
# 'Conda configuration. When the channel alias is Anaconda.org or an
# Anaconda Server GUI, you can set the system configuration so that users
# automatically see private packages. Anaconda.org was formerly known as
# binstar.org. This uses the Anaconda command-line client, which you can
# install with conda install anaconda-client, to automatically add the token
# to the channel URLs. The default is "true". See
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#add-anaconda-org-token-to-automatically-see-private-packages-add-anaconda-token
# for more information.'
# required: false
# default: ""
# add-pip-as-python-dependency:
# description:
# 'Conda configuration. Add pip, wheel, and setuptools as dependencies of
# Python. This ensures that pip, wheel, and setuptools are always installed
# any time Python is installed. The default is "true". See
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#add-pip-as-python-dependency-add-pip-as-python-dependency
# for more information.'
# required: false
# default: ""
# allow-softlinks:
# description:
# 'Conda configuration. When allow_softlinks is "true", conda uses
# hard-links when possible and soft-links---symlinks---when hard-links are
# not possible, such as when installing on a different file system than the
# one that the package cache is on. When allow_softlinks is "false", conda
# still uses hard-links when possible, but when it is not possible, conda
# copies files. Individual packages can override this option, specifying
# that certain files should never be soft-linked. The default is "true". See
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#disallow-soft-linking-allow-softlinks
# for more information.'
# required: false
# default: ""
# auto-activate-base:
# description:
# 'Conda configuration. If you’d prefer that conda’s base environment not be
# activated on startup, set the to "false". Default is "true". This setting
# always overrides if set to "true" or "false". If you want to use the
# "condarc-file" setting pass and empty string. See
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/
# for more information.'
# required: false
# default: "true"
# use-only-tar-bz2:
# description:
# 'Conda configuration. Conda 4.7 introduced a new .conda package file
# format. .conda is a more compact and faster alternative to .tar.bz2
# packages. It is thus the preferred file format to use where available.
# Nevertheless, it is possible to force conda to only download .tar.bz2
# packages by setting the use_only_tar_bz2 boolean to "true". The default is
# "false". See
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#force-conda-to-download-only-tar-bz2-packages-use-only-tar-bz2
# for more information.'
# required: false
# default: ""
# remove-profiles:
# description:
# 'Advanced. Prior to running "conda init" all shell profiles will be
# removed from the runner. Default is "true".'
# required: false
# default: "true"
# show-channel-urls:
# description:
# 'Conda configuration. Show channel URLs when displaying what is going to
# be downloaded and in conda list. The default is "false". See
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#show-channel-urls-show-channel-urls
# for more information.'
# required: false
# default: ""
# architecture:
# description:
# 'Architecture of Miniconda that should be installed. Available options on
# GitHub-hosted runners are "x86" and "x64". Default is "x64".'
# required: false
# default: "x64"
# clean-patched-environment-file:
# description:
# "Whether a patched environment-file (if created) should be cleaned"
# required: false
# default: "true"
runs:
using: "node16"
main: "dist/main/index.js"
post: "dist/post/index.js"