Checkstyle #48
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- release* | |
tags: | |
- v* | |
env: | |
IMAGE_BASE_REGISTRY: quay.io | |
IMAGE_REGISTRY: quay.io/redhat-saia/quarkus-routing-service | |
jobs: | |
build-jar: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '21' | |
distribution: 'adopt' | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Download model | |
run: | | |
curl -L https://huggingface.co/nomic-ai/nomic-embed-text-v1/resolve/main/onnx/model_quantized.onnx?download=true --output src/main/resources/embeddings/nomic/model.onnx | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Archive target folder | |
uses: actions/upload-artifact@v4 | |
with: | |
name: target | |
path: target | |
include-hidden-files: true | |
retention-days: 1 | |
build-image: | |
needs: build-jar | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Download target folder | |
uses: actions/download-artifact@v4 | |
with: | |
name: target | |
path: target | |
- name: Login to Docker Registry | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
registry: ${{ env.IMAGE_BASE_REGISTRY }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Containerfile | |
push: true | |
tags: ${{ env.IMAGE_REGISTRY }}:${{ github.ref_name }}, ${{ env.IMAGE_REGISTRY }}:latest | |
ulimit: nofile=4096 |