Skip to content

Commit b245e4a

Browse files
committed
rename, change anaconda/pixi checks
1 parent 5e519a8 commit b245e4a

File tree

5 files changed

+32
-27
lines changed

5 files changed

+32
-27
lines changed

.github/workflows/test-conda-verify.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
shell: bash -el {0}
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323

2424
- name: Verify conda package
2525
uses: neutrons/conda-actions/conda-verify@main
@@ -40,7 +40,7 @@ jobs:
4040
shell: bash -el {0}
4141
steps:
4242
- name: Checkout
43-
uses: actions/checkout@v4
43+
uses: actions/checkout@v6
4444

4545
- name: Verify conda package
4646
uses: neutrons/conda-actions/conda-verify@main

README.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ and that it is located in a conda-style channel directory (see [conda-index](htt
99

1010
Available actions:
1111

12-
- [conda-verify](#conda-verify): Verify a conda package by installing it with `micromamba` and ensuring it is importable by Python, and that the version reported by conda and python match.
13-
- [conda-publish](#conda-publish): Publish a conda package to Anaconda Cloud.
14-
- [conda-cleanup](#conda-cleanup): Clean up old conda packages from Anaconda Cloud.
12+
- [pkg-verify](#pkg-verify): Verify a conda package by installing it with `micromamba` and ensuring it is importable by Python, and that the version reported by conda and python match.
13+
- [pkg-remove](#pkg-remove): Clean up old conda packages from Anaconda Cloud.
14+
- [publish](#publish): Publish a conda package to Anaconda Cloud.
1515

16-
## conda-verify
16+
## pkg-verify
1717

1818
GitHub action to verify a conda package by installing it with `micromamba` and ensuring it is importable by Python, and that the version reported by conda and python match.
1919

2020
#### Usage
2121

22-
Available inputs are listed in [`conda-verify/action.yaml`](#conda-verify/action.yaml).
22+
Available inputs are listed in [`pkg-verify/action.yaml`](#pkg-verify/action.yaml).
2323

2424
Example usage in a GitHub workflow:
2525

@@ -39,7 +39,7 @@ jobs:
3939
path: ${{ env.PKG_NAME }}-*.conda
4040

4141
# Then, to verify the conda package:
42-
conda-verify:
42+
pkg-verify:
4343
needs: build
4444
run-on: ubuntu-latest
4545
defaults:
@@ -53,35 +53,29 @@ jobs:
5353
path: /tmp/local-channel/linux-64
5454

5555
- name: Verify Conda Package
56-
uses: neutrons/conda-actions/conda-verify@main
56+
uses: neutrons/conda-actions/pkg-verify@main
5757
with:
5858
local-channel: /tmp/local-channel
5959
package-name: ${{ env.PKG_NAME }}
6060
extra-channels: mantid neutrons pyoncat
6161
```
6262
63-
## conda-publish
64-
65-
GitHub action to publish a conda package to Anaconda Cloud.
66-
67-
#### Usage
68-
69-
## conda-cleanup
63+
## pkg-remove
7064
7165
GitHub action to remove old packages of a specific label from [anaconda.org](https://anaconda.org),
7266
keeping the N most recent versions.
7367
74-
## Usage
68+
#### Usage
7569
76-
Available inputs are listed in [`conda-cleanup/action.yaml`](#conda-cleanup/action.yaml).
70+
Available inputs are listed in [`pkg-remove/action.yaml`](#pkg-remove/action.yaml).
7771

7872
```yaml
7973
jobs:
8074
cleanup:
8175
runs-on: ubuntu-latest
8276
steps:
8377
- name: Remove old dev packages
84-
uses: neutrons/conda-actions/conda-cleanup@main
78+
uses: neutrons/conda-actions/pkg-remove@main
8579
with:
8680
anaconda_token: ${{ secrets.ANACONDA_TOKEN }}
8781
organization: neutrons
@@ -90,7 +84,7 @@ jobs:
9084
keep: 5
9185
```
9286

93-
## Inputs
87+
Inputs:
9488

9589
| Input | Description | Required | Default |
9690
| ---------------- | --------------------------------------------------------------------- | -------- | ------- |
@@ -101,8 +95,16 @@ jobs:
10195
| `keep` | Number of most recent package versions to keep | No | `5` |
10296
| `dry_run` | If `true`, only print what would be deleted without actually deleting | No | `false` |
10397

104-
## Outputs
98+
Outputs:
10599

106100
| Output | |
107101
| ------------- | ------------------------------------- |
108102
| `num_removed` | Number of files that would be deleted |
103+
104+
## publish
105+
106+
GitHub action to publish a conda package to Anaconda Cloud.
107+
108+
#### Usage
109+
110+
TBD
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,18 @@ inputs:
3030
runs:
3131
using: "composite"
3232
steps:
33-
# Install pixi if not already available, then ensure anaconda-client is installed.
34-
- name: Install anaconda-client via pixi
33+
- name: Check for anaconda and pixi commands
3534
shell: bash
3635
run: |
37-
if ! command -v pixi &>/dev/null; then
38-
curl -fsSL https://pixi.sh/install.sh | bash
39-
echo "${HOME}/.pixi/bin" >> "${GITHUB_PATH}"
36+
if ! command -v anaconda &> /dev/null; then
37+
if ! command -v pixi &> /dev/null; then
38+
echo "Error: Neither 'anaconda' nor 'pixi' command found. Please install the Anaconda Client or Pixi CLI to use this action."
39+
exit 1
40+
else
41+
echo "'pixi' command found. Installing anaconda-client via pixi..."
42+
pixi install anaconda-client
43+
fi
4044
fi
41-
pixi global install anaconda-client
4245
4346
- name: Upload package to Anaconda Cloud
4447
shell: bash

0 commit comments

Comments
 (0)