From 7da82e12b2bb1b2e13b62bdf627c3903e9a1fb09 Mon Sep 17 00:00:00 2001 From: "Sara A. Miskovich" Date: Wed, 4 Sep 2024 10:56:11 -0700 Subject: [PATCH] adds workflow for publishing docker image --- .github/workflows/publish-image.yaml | 27 +++++++++++++++++++ {sdt_dask/docker => docker}/Dockerfile | 2 +- {sdt_dask/docker => docker}/README.md | 0 {sdt_dask/docker => docker}/requirements.txt | 2 +- .../sdt-v1_full_pip_freeze.txt | 0 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish-image.yaml rename {sdt_dask/docker => docker}/Dockerfile (73%) rename {sdt_dask/docker => docker}/README.md (100%) rename {sdt_dask/docker => docker}/requirements.txt (84%) rename {sdt_dask/docker => docker}/sdt-v1_full_pip_freeze.txt (100%) diff --git a/.github/workflows/publish-image.yaml b/.github/workflows/publish-image.yaml new file mode 100644 index 00000000..d932e7b7 --- /dev/null +++ b/.github/workflows/publish-image.yaml @@ -0,0 +1,27 @@ +name: Publish image to Docker Hub +on: + [workflow_dispatch] +# workflow_run: +# workflows: [build] +# types: +# - completed + +jobs: + publish-image: + #if: ${{ github.event.workflow_run.conclusion == 'success' }} + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and Push Docker Image + run: | + docker build -t ./docker/. ${{ secrets.DOCKER_USERNAME }}/sdt-v2:latest + docker push ${{ secrets.DOCKER_USERNAME }}/sdt-v2:latest \ No newline at end of file diff --git a/sdt_dask/docker/Dockerfile b/docker/Dockerfile similarity index 73% rename from sdt_dask/docker/Dockerfile rename to docker/Dockerfile index 4749a20f..26d68a8d 100644 --- a/sdt_dask/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,6 +4,6 @@ WORKDIR /root RUN mkdir sdt WORKDIR /root/sdt -COPY ../../requirements.txt /root/sdt/. +COPY requirements.txt /root/sdt/. RUN pip install -r requirements.txt diff --git a/sdt_dask/docker/README.md b/docker/README.md similarity index 100% rename from sdt_dask/docker/README.md rename to docker/README.md diff --git a/sdt_dask/docker/requirements.txt b/docker/requirements.txt similarity index 84% rename from sdt_dask/docker/requirements.txt rename to docker/requirements.txt index eee5ad37..3255bf98 100644 --- a/sdt_dask/docker/requirements.txt +++ b/docker/requirements.txt @@ -1,4 +1,4 @@ -solar-data-tools==1.6.0 +solar-data-tools numpy==2.0.0 dask==2024.5.2 distributed==2024.5.2 diff --git a/sdt_dask/docker/sdt-v1_full_pip_freeze.txt b/docker/sdt-v1_full_pip_freeze.txt similarity index 100% rename from sdt_dask/docker/sdt-v1_full_pip_freeze.txt rename to docker/sdt-v1_full_pip_freeze.txt