diff --git a/.github/workflows/dockerhubES.yml b/.github/workflows/dockerhubES.yml new file mode 100644 index 00000000..39fd7a04 --- /dev/null +++ b/.github/workflows/dockerhubES.yml @@ -0,0 +1,47 @@ +name: Create and publish Elastic Search Docker image to Docker hub + +on: + push: + branches: + - "master" + release: + workflow_dispatch: + +env: + REGISTRY: docker.io + IMAGE_NAME: intrahealth/elasticsearch + +jobs: + build-and-push-es-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the Docker registry + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch,pattern=main,latest=true + type=ref,event=tag + type=sha + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: ./docker/elasticsearch + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/.github/workflows/dockerhubopencr.yml b/.github/workflows/dockerhubopencr.yml new file mode 100644 index 00000000..4e4ff5ea --- /dev/null +++ b/.github/workflows/dockerhubopencr.yml @@ -0,0 +1,47 @@ +name: Create and publish OpencCR Docker image to Docker hub + +on: + push: + branches: + - "master" + release: + workflow_dispatch: + +env: + REGISTRY: docker.io + IMAGE_NAME: intrahealth/opencr + +jobs: + build-and-push-opencr-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the Docker registry + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch,pattern=main,latest=true + type=ref,event=tag + type=sha + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: ./docker/opencr + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file