From 7448b92e243c6ea0ddeb56f7a16174e93e71402f Mon Sep 17 00:00:00 2001 From: Stephan Grein Date: Thu, 28 Nov 2024 18:17:36 +0100 Subject: [PATCH] Push latest pyPESTO (develop) build as image with tag `latest` to docker.io (#1083) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adding proposal to deploy to docker hub. * Fix path to Dockerfile. * Update publish_dockerhub.yml * Update publish_dockerhub.yml * Update publish_dockerhub.yml --------- Co-authored-by: Yannik Schälte <31767307+yannikschaelte@users.noreply.github.com> Co-authored-by: Paul Jonas Jost <70631928+PaulJonasJost@users.noreply.github.com> --- .github/workflows/publish_dockerhub.yml | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish_dockerhub.yml diff --git a/.github/workflows/publish_dockerhub.yml b/.github/workflows/publish_dockerhub.yml new file mode 100644 index 000000000..55d970055 --- /dev/null +++ b/.github/workflows/publish_dockerhub.yml @@ -0,0 +1,32 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - main + paths: + - 'docker/**' + - '.github/workflows/docker-publish.yml' + workflow_dispatch: + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Check out the repository + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Build and tag the Docker image + run: | + docker build -t ICB_DCM/pypesto:latest -f docker/Dockerfile . + + - name: Push the Docker image to Docker Hub + run: | + docker push ICB_DCM/pypesto:latest