Package Nesis #12
Workflow file for this run
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: Package Nesis | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Tag' | |
required: true | |
core: | |
description: 'Core' | |
required: true | |
default: cpu | |
type: choice | |
options: | |
- cpu | |
- cuda | |
jobs: | |
package_api: | |
name: Package API | |
runs-on: ubuntu-latest | |
# if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
file: ./nesis/api/Dockerfile | |
tags: ametnes/nesis:${{ github.event.inputs.tag }}-api,ametnes/nesis:latest-api | |
build-args: | | |
NESIS_VERSION=${{ github.event.inputs.tag }} | |
package_frontend: | |
name: Package Frontend | |
runs-on: ubuntu-latest | |
# if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.dockerfile_branch }} | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Build and push frontend Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
file: ./nesis/frontend/Dockerfile | |
tags: ametnes/nesis:${{ github.event.inputs.tag }}-frontend, ametnes/nesis:latest-frontend | |
build-args: | | |
PUBLIC_URL=/ | |
PROFILE=PROD | |
NESIS_VERSION=${{ github.event.inputs.tag }} | |
package_rag_cpu: | |
name: Package ${{ github.event.inputs.tag}} RAG Engine | |
runs-on: ubuntu-latest | |
# if: github.ref == 'refs/heads/main' | |
if: "${{ github.event.inputs.core == 'cpu' }}" | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.dockerfile_branch }} | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Build and push RAG docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
file: ./nesis/rag/Dockerfile | |
tags: ametnes/nesis:${{ github.event.inputs.tag }}-rag, ametnes/nesis:latest-rag | |
build-args: | | |
NESIS_VERSION=${{ github.event.inputs.tag }} | |
package_rag_cuda: | |
name: Package ${{ github.event.inputs.tag}} RAG Engine | |
runs-on: ubuntu-latest | |
# if: github.ref == 'refs/heads/main' | |
if: "${{ github.event.inputs.core == 'cuda' }}" | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.dockerfile_branch }} | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Build and push core tagged RAG docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
file: ./nesis/rag/Dockerfile | |
tags: ametnes/nesis:${{ github.event.inputs.tag }}-rag-${{ github.event.inputs.core }}, ametnes/nesis:latest-rag-${{ github.event.inputs.core }} | |
build-args: | | |
NESIS_VERSION=${{ github.event.inputs.tag }} | |
CORE=${{ github.event.inputs.core }} |