mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-26 20:08:38 +02:00
Hope this actually skips the model server builds now (#3987)
This commit is contained in:
@@ -4,9 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "*"
|
- "*"
|
||||||
paths:
|
|
||||||
- 'backend/model_server/**'
|
|
||||||
- 'backend/Dockerfile.model_server'
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY_IMAGE: ${{ contains(github.ref_name, 'cloud') && 'onyxdotapp/onyx-model-server-cloud' || 'onyxdotapp/onyx-model-server' }}
|
REGISTRY_IMAGE: ${{ contains(github.ref_name, 'cloud') && 'onyxdotapp/onyx-model-server-cloud' || 'onyxdotapp/onyx-model-server' }}
|
||||||
@@ -15,7 +12,32 @@ env:
|
|||||||
BUILDKIT_PROGRESS: plain
|
BUILDKIT_PROGRESS: plain
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
# 1) Preliminary job to check if the changed files are relevant
|
||||||
|
check_model_server_changes:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
changed: ${{ steps.check.outputs.changed }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check if relevant files changed
|
||||||
|
id: check
|
||||||
|
run: |
|
||||||
|
# Default to "false"
|
||||||
|
echo "changed=false" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# Compare the previous commit (github.event.before) to the current one (github.sha)
|
||||||
|
# If any file in backend/model_server/** or backend/Dockerfile.model_server is changed,
|
||||||
|
# set changed=true
|
||||||
|
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} \
|
||||||
|
| grep -E '^backend/model_server/|^backend/Dockerfile.model_server'; then
|
||||||
|
echo "changed=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
build-amd64:
|
build-amd64:
|
||||||
|
needs: [check_model_server_changes]
|
||||||
|
if: needs.check_model_server_changes.outputs.changed == 'true'
|
||||||
runs-on:
|
runs-on:
|
||||||
[runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}-amd64"]
|
[runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}-amd64"]
|
||||||
steps:
|
steps:
|
||||||
@@ -55,6 +77,8 @@ jobs:
|
|||||||
provenance: false
|
provenance: false
|
||||||
|
|
||||||
build-arm64:
|
build-arm64:
|
||||||
|
needs: [check_model_server_changes]
|
||||||
|
if: needs.check_model_server_changes.outputs.changed == 'true'
|
||||||
runs-on:
|
runs-on:
|
||||||
[runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}-arm64"]
|
[runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}-arm64"]
|
||||||
steps:
|
steps:
|
||||||
@@ -94,7 +118,8 @@ jobs:
|
|||||||
provenance: false
|
provenance: false
|
||||||
|
|
||||||
merge-and-scan:
|
merge-and-scan:
|
||||||
needs: [build-amd64, build-arm64]
|
needs: [build-amd64, build-arm64, check_model_server_changes]
|
||||||
|
if: needs.check_model_server_changes.outputs.changed == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
|
Reference in New Issue
Block a user