Skip to content

Commit bb247d6

Browse files
authored
Merge pull request #50 from ImperialCollegeLondon/upload_dafni
Add publish to DAFNI
2 parents 1b659ee + 10ca5a6 commit bb247d6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/publish.yml

+27
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,30 @@ jobs:
6666

6767
- name: Publish package distributions to PyPI
6868
uses: pypa/gh-action-pypi-publish@release/v1
69+
70+
publish-DAFNI:
71+
needs: publish-PyPI
72+
name: Publish WSIMOD to DAFNI
73+
runs-on: ubuntu-latest
74+
env:
75+
VERSION: ${{ github.event.release.tag_name }}
76+
DAFNI_USERNAME: ${{ secrets.DAFNI_USERNAME }}
77+
DAFNI_PASSWORD: ${{ secrets.DAFNI_PASSWORD }}
78+
PARENT_ID: ${{ vars.PARENT_ID }}
79+
steps:
80+
- uses: actions/checkout@v4
81+
- uses: actions/setup-python@v4
82+
83+
- name: Create Docker image
84+
run: |
85+
docker build -t wsimod:$VERSION .
86+
docker save -o wsimod-$VERSION.tar.gz wsimod:$VERSION
87+
88+
- name: Install DAFNI API
89+
run: python -m pip install dafni-cli
90+
91+
- name: Log in to DAFNI
92+
run: dafni login
93+
94+
- name: Upload updated model
95+
run: dafni upload model model_file.yaml wsimod-$VERSION.tar.gz --parent-id $PARENT_ID -m "v$VERSION, see release notes."

0 commit comments

Comments
 (0)