-
Notifications
You must be signed in to change notification settings - Fork 11
71 lines (63 loc) · 2.24 KB
/
sync-to-artifactory.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
name: sync to artifactory
description: download package from conan center and upload it and dpendency to jfrog artifactory
on:
workflow_dispatch:
inputs:
package:
description: 'The Conan package to install'
required: true
default: 'gdal/3.5.3'
upload:
description: 'Choose whether to perform upload or dry run'
required: false
type: choice
options:
- 'true'
- 'false'
default: 'false'
repository:
description: 'Choose Artifactory repository'
required: false
type: choice
options:
- default-conan-local
- conan-local2
default: 'conan-local2'
jobs:
sync-conan-package:
runs-on: ubuntu-latest
env:
CONAN_REVISIONS_ENABLED: 1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Conan
run: |
pip install --user conan==1.65.0
conan --version
- name: Configure Conan remote
run: |
if [ "${{ github.event.inputs.repository }}" = "default-conan-local" ]; then
conan remote add artifactory https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local
else
# for testing purpose
conan remote add artifactory https://milvus01.jfrog.io/artifactory/api/conan/conan-local2
fi
# List remote Conan repositories; should include Conan Center by default
conan remote list
- name: Install package
run: |
conan install ${{ github.event.inputs.package }}@ -s compiler=gcc -s compiler.version=11 -s compiler.libcxx=libstdc++11 -s build_type=Release
- name: inspect installed package
run: |
# Search for installed packages and their revisions
conan search '*' --revisions
- name: Upload
if: ${{ github.event.inputs.upload == 'true' }}
run: |
conan user -p ${{ secrets.JFROG_PASSWORD }} -r artifactory ${{ secrets.JFROG_USERNAME }}
# upload all packages
# Upload only the Conan recipe to the specified local repository, excluding binaries
conan upload '*' -r artifactory -c