Merge pull request #9 from idso-fa1-pathology/release/v1.1.3 #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Log in to Docker Hub | |
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin | |
- name: Log in to GitHub Container Registry | |
run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Build the Docker image | |
run: docker build . --file Dockerfile --tag cell-sight-package:latest | |
- name: Tag the Docker image for Docker Hub | |
run: docker tag cell-sight-package:latest ${{ secrets.DOCKER_HUB_USERNAME }}/cell-sight-package:latest | |
- name: Tag the Docker image for GitHub Packages | |
run: docker tag cell-sight-package:latest ghcr.io/${{ github.repository_owner }}/cell-sight-package:latest | |
- name: Push the Docker image to Docker Hub | |
run: docker push ${{ secrets.DOCKER_HUB_USERNAME }}/cell-sight-package:latest | |
- name: Push the Docker image to GitHub Packages | |
run: docker push ghcr.io/${{ github.repository_owner }}/cell-sight-package:latest |