Skip to content

Commit b7beaa9

Browse files
committed
Add basic functionality
1 parent fbf149e commit b7beaa9

File tree

9 files changed

+59783
-300
lines changed

9 files changed

+59783
-300
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
merge_group:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v2
18+
with:
19+
version: 8
20+
21+
- name: Install Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 20
25+
cache: pnpm
26+
27+
- name: Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
30+
- name: Rebuild the dist/ directory
31+
run: pnpm build
32+
33+
- name: Lint
34+
run: pnpm lint

.github/workflows/check-dist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install Node.js
2323
uses: actions/setup-node@v3
2424
with:
25-
node-version: 16
25+
node-version: 20
2626
cache: pnpm
2727

2828
- name: Install dependencies

action.yml

Lines changed: 38 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -6,90 +6,50 @@ branding:
66
color: yellow
77

88
inputs:
9-
condarc-file:
10-
description: |
11-
Path to a condarc file to use
12-
condarc:
13-
description: |
14-
Contents of a condarc file to use.
15-
environment-file:
16-
description: |
17-
Path to the `environment.yml` or `.lock` file for the environment.
18-
environment-name:
19-
description: |
20-
Name of the environment to create. Overrides the name in the environment file.
21-
create-args:
22-
description: |
23-
Extra arguments to pass to `micromamba create`.
24-
Also possible to list extra specs to install into the environment.
25-
For multiple packages, separate using spaces or use multiline syntax:
26-
```yml
27-
create-args: package1 package2
28-
# or
29-
create-args: >-
30-
package1
31-
package2
32-
```
9+
pixi-version:
10+
description: Version of pixi to install
11+
pixi-url:
12+
description: URL of pixi to install
3313
log-level:
3414
description: |
35-
Log level for micromamba.
36-
One of `'trace'`, `'debug'`, `'info'`, `'warning'`, `'error'`, `'critical'`, `'off'`.
37-
micromamba-version:
38-
description: |
39-
Version of micromamba to install.
40-
Must match with a micromamba version from the https://github.com/mamba-org/micromamba-releases repository or 'latest'.
41-
micromamba-url:
42-
description: |
43-
URL to download micromamba from.
44-
init-shell:
45-
description: |
46-
Which shells to initialize micromamba in.
47-
Also possible to list multiple shells using spaces or use multiline syntax:
48-
```yml
49-
init-shell: bash cmd.exe powershell
50-
# or
51-
init-shell: >-
52-
bash
53-
cmd.exe
54-
powershell
55-
```
56-
To initialize no shell, use `'none'`.
57-
Also supports other shells than bash, cmd.exe and powershell, but they are not tested.
15+
Log level for the pixi CLI.
16+
One of `quiet`, `warn`, `info`, `debug`, or `trace`.
17+
manifest-path:
18+
description: Path to the manifest file (i.e., `pixi.toml`) to use for the pixi CLI. Defaults to `pixi.toml`.
19+
run-install:
20+
description: Whether to run `pixi install` after setting up the environment. Defaults to `true`.
5821
generate-run-shell:
5922
description: |
60-
Whether to generate a custom shell script that allows to use it in the workflow file using `run: micromamba-shell {0}`
61-
cache-downloads:
62-
description: |
63-
Whether to cache downloads or not.
64-
cache-downloads-key:
65-
description: |
66-
Cache key to use for caching.
67-
cache-environment:
68-
description: |
69-
Whether to cache the environment or not.
70-
cache-environment-key:
71-
description: |
72-
Cache key to use for caching.
23+
Whether to generate a custom shell script that allows to use it in the workflow file using `run: pixi-shell {0}`.
24+
cache:
25+
description: Whether to cache the pixi environment. Defaults to `true`. Only works if `pixi.lock` is present.
26+
cache-key:
27+
description: |
28+
Cache key prefix to use for caching the pixi environment.
29+
Defaults to `pixi-{conda-arch}`.
30+
pixi-bin-path:
31+
description: |
32+
Path to the pixi binary to use. Defaults to `~/.pixi/bin/pixi`.
33+
auth-host:
34+
description: |
35+
Host to use for authentication. If not set, pixi is not authenticating.
36+
Requires `auth-token` or `auth-conda-token` or `auth-username` and `auth-password` to be set.
37+
See https://prefix.dev/docs/pixi/authentication
38+
auth-token:
39+
description: Token to use for authentication.
40+
auth-username:
41+
description: Username to use for authentication.
42+
auth-password:
43+
description: Password to use for authentication.
44+
auth-conda-token:
45+
description: Conda token to use for authentication.
7346
post-cleanup:
7447
description: |
75-
Which kind of cleanup to do after the action.
76-
`'none'` - do not cleanup anything.
77-
`'shell-init'` - cleanup only the shell initialization scripts.
78-
`'environment'` - cleanup the installed environment and shell initialization scripts.
79-
`'all'` - cleanup everything including the whole micromamba root folder and the micromamba binary.
80-
micromamba-root-path:
81-
description: |
82-
Path to the micromamba root folder.
83-
Defaults to `~/micromamba`.
84-
micromamba-binary-path:
85-
description: |
86-
Path to the micromamba binary.
87-
Defaults to `~/micromamba-bin/micromamba`.
88-
Also specifies the path to the custom condarc which is located in the same folder as the micromamba binary.
89-
90-
outputs:
91-
environment-path:
92-
description: Path to the created environment. Only populated if environment was created, i.e., `environment-file` or `environment-name` was specified.
48+
What kind of cleanup the action should do in the post step.
49+
One of `none`, `environment` or `all`.
50+
If `none`, no cleanup is done.
51+
If `environment`, the pixi environment is removed.
52+
If `all`, the pixi environment, the pixi CLI are removed and the rattler cache is cleared.
9353
9454
runs:
9555
using: node20

0 commit comments

Comments
 (0)