Skip to content

Commit 00b8d61

Browse files
committed
fix env variable
1 parent dc84a1a commit 00b8d61

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/publish-to-dafni.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ jobs:
3232
DAFNI_PARENT_ID: ${{ secrets.DAFNI_PARENT_ID }}
3333
DAFNI_USERNAME: ${{ secrets.DAFNI_USERNAME }}
3434
DAFNI_PASSWORD: ${{ secrets.DAFNI_PASSWORD }}
35-
CTF_VERSION: ${{ github.event.release.tag_name.split('.')[0] }}
35+
CTF_VERSION: |
36+
version="${{ github.event.release.tag_name }}"
37+
version=${version%%.*}
3638
3739
steps:
3840
- uses: actions/checkout@v3
@@ -41,8 +43,8 @@ jobs:
4143
python-version: 3.9
4244
- name: Build the container
4345
run: |
44-
docker build -t ctf:${CTF_VERSION} -f ./dafni/Dockerfile .
45-
docker save ctf:${CTF_VERSION} | gzip > ctf${CTF_VERSION}.tar.gz
46+
docker build -t ctf:${version} -f ./dafni/Dockerfile .
47+
docker save ctf:${version} | gzip > ctf${version}.tar.gz
4648
4749
- name: Install DAFNI-CLI and log in
4850
run: |
@@ -51,5 +53,5 @@ jobs:
5153
5254
- name: Upload to DAFNI
5355
run: |
54-
dafni upload model ./dafni/model_definition.yaml ctf${CTF_VERSION}.tar.gz --version-message "Version ${CTF_VERSION}. Uploaded via Github." --parent-id ${DAFNI_PARENT_ID} -y
56+
dafni upload model ./dafni/model_definition.yaml ctf${version}.tar.gz --version-message "Version ${version}. Uploaded via Github." --parent-id ${DAFNI_PARENT_ID} -y
5557
dafni logout

0 commit comments

Comments
 (0)