File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 5
5
release :
6
6
types : [published]
7
7
8
-
9
8
jobs :
10
9
11
10
build_and_upload :
@@ -16,17 +15,25 @@ jobs:
16
15
DAFNI_PARENT_ID : ${{ secrets.DAFNI_PARENT_ID }}
17
16
DAFNI_USERNAME : ${{ secrets.DAFNI_USERNAME }}
18
17
DAFNI_PASSWORD : ${{ secrets.DAFNI_PASSWORD }}
19
- CTF_VERSION : ${{ github.event.release.tag_name }}
20
18
21
19
steps :
22
20
- uses : actions/checkout@v3
23
21
- uses : actions/setup-python@v3
24
22
with :
25
23
python-version : 3.9
24
+
25
+ - name : Set CTF_VERSION and VERSION
26
+ run : |
27
+ TAG=${{ github.event.release.tag_name }}
28
+ CTF_VERSION="$TAG"
29
+ VERSION=$(echo "$TAG" | sed 's/v//; s/\.[0-9]*$//')
30
+ echo "CTF_VERSION=${CTF_VERSION}" >> $GITHUB_ENV
31
+ echo "VERSION=v${VERSION}" >> $GITHUB_ENV
32
+
26
33
- name : Build the container
27
34
run : |
28
- docker build -t ctf:gh -f ./dafni/Dockerfile .
29
- docker save ctf:gh | gzip > ctf-gh .tar.gz
35
+ docker build -t ctf:VERSION -f ./dafni/Dockerfile .
36
+ docker save ctf:VERSION | gzip > ctf-${VERSION} .tar.gz
30
37
31
38
- name : Install DAFNI-CLI and log in
32
39
run : |
35
42
36
43
- name : Upload to DAFNI
37
44
run : |
38
- dafni upload model ./dafni/model_definition.yaml ctf-gh .tar.gz --version-message "Version ${CTF_VERSION}. Uploaded via Github." --parent-id ${DAFNI_PARENT_ID} -y
45
+ dafni upload model ./dafni/model_definition.yaml ctf-${VERSION} .tar.gz --version-message "Version ${CTF_VERSION}. Uploaded via Github." --parent-id ${DAFNI_PARENT_ID} -y
39
46
dafni logout
You can’t perform that action at this time.
0 commit comments