-
Notifications
You must be signed in to change notification settings - Fork 5
87 lines (81 loc) · 2.39 KB
/
conda-build.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
name: Conda Build
on:
release:
types: [published]
workflow_dispatch:
inputs:
buildNumber:
type: string
required: false
default: "0"
description: "build-nr: conda build-nr of anaconda.org"
version:
type: string
required: true
description: "version: PEP440 package-version (incl. leading 'v')"
dev:
required: true
type: boolean
description: "dev-build? If yes, it sets an offset to build-nr"
workflow_call:
inputs:
buildNumber:
type: string
required: true
version:
type: string
required: true
dev:
required: false
default: false
type: boolean
jobs:
conda-build:
runs-on: ubuntu-latest
container: ghcr.io/i4ds/mambabuild-docker:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get Previous tag
uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- name: Build Conda
shell: bash -l {0}
run: |
if [[ ${{ github.event_name }} == "release" ]]
then
BUILD_NR="0"
KARABO_TAG=${{ steps.get-latest-tag.outputs.tag }}
KARABO_VER="${KARABO_TAG:1}"
fi
if [[ ${{ github.event_name }} == "workflow_dispatch" ]] || [[ ${{ github.event_name }} == "workflow_call" ]]
then
BUILD_NR=${{ inputs.buildNumber }}
KARABO_VER=${{ inputs.version }}
fi
DEV_STR="dev"
if [[ ${{ inputs.dev }} == "true" ]]
then
if [[ "$KARABO_VER" != *"$DEV_STR"* ]]
then
exit 2
fi
BUILD_NR="$(($BUILD_NR + 999))"
else
if [[ "$KARABO_VER" == *"$DEV_STR"* ]]
then
exit 2
fi
fi
export KARABO_VERSION=$KARABO_VER
export BUILD_NUMBER=$BUILD_NR
conda config --append channels i4ds
conda config --append channels nvidia/label/cuda-11.7.0
conda config --append channels conda-forge
cd conda
conda mambabuild .
- name: Publish to Conda
shell: bash -l {0}
run: |
conda activate base
anaconda -t ${{ secrets.ANACONDA_SECRET }} upload /opt/conda/conda-bld/linux-64/karabo-pipeline-*.tar.bz2 --force