Skip to content

Commit

Permalink
Added requirements and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dschiese committed May 21, 2024
1 parent 24d387e commit f7360e1
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Docker Image CI

on: push

jobs:
build:
runs-on: ubuntu-latest
env:
CUSTOM_HEADER_LORIS: ${{ secrets.CUSTOM_HEADER_LORIS }}
steps:
- uses: actions/checkout@v4
- name: Save tag to file if release
if: startsWith(github.ref, 'refs/tags/')
run: echo ${{ github.ref_name }} > VERSION.txt
- name: Build the Docker image for temporary use only
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
run: docker build . --file Dockerfile --tag tmp:latest
- name: Build the Docker image for tag release
if: startsWith(github.ref, 'refs/tags/')
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKER_IMAGE_NAME }}:latest
- name: Docker Login
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Tag latest docker image
if: startsWith(github.ref, 'refs/tags/')
run: docker tag ${{ secrets.DOCKER_IMAGE_NAME }}:latest wseresearch/${{ secrets.DOCKER_IMAGE_NAME }}:latest
- name: Tag docker image version
if: startsWith(github.ref, 'refs/tags/')
run: docker tag ${{ secrets.DOCKER_IMAGE_NAME }}:latest "wseresearch/${{ secrets.DOCKER_IMAGE_NAME }}:${{ github.ref_name }}"
- name: Push latest docker image
if: startsWith(github.ref, 'refs/tags/')
run: docker push wseresearch/${{ secrets.DOCKER_IMAGE_NAME }}:latest
- name: Push docker image version
if: startsWith(github.ref, 'refs/tags/')
run: docker push "wseresearch/${{ secrets.DOCKER_IMAGE_NAME }}:${{ github.ref_name }}"
- name: Init update
if: startsWith(github.ref, 'refs/tags/')
uses: WSE-research/[email protected]
with:
updater_host: ${{ secrets.UPDATER_HOST }}
api_key: ${{ secrets.API_KEY }}
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
streamlit==1.31.1
streamlit_code_editor==0.1.0
extra_streamlit_components==0.1.70
decouple===0.0.7
streamlit_sortables===0.2.0
st_aggrid===1.0.5
rdflib==7.0.0

0 comments on commit f7360e1

Please sign in to comment.