Skip to content

[v0.15.0] Docker Image Build and Push (Development) #6

[v0.15.0] Docker Image Build and Push (Development)

[v0.15.0] Docker Image Build and Push (Development) #6

name: Unstract Docker Image Build and Push (Production)
on:
release:
types:
- created
run-name: "[${{ github.event.release.tag_name }}] Docker Image Build and Push (Development)"
jobs:
build-and-push:
runs-on: custom-k8s-runner
strategy:
matrix:
service_name: [backend, frontend, document-service, platform-service, prompt-service, worker, x2text-service]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.release.tag_name }}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push image
working-directory: ./docker
run: |
VERSION=${{ github.event.release.tag_name }} docker-compose -f docker-compose.build.yaml build --no-cache ${{ matrix.service_name }}
docker push unstract/${{ matrix.service_name }}:${{ github.event.release.tag_name }}