Skip to content

Commit

Permalink
separate job
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
codefromthecrypt committed Feb 20, 2025
1 parent d98f954 commit 45c819c
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/docker-chatbot-rag-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ jobs:
outputs: type=image,name=${{ env.IMAGE }},push-by-digest=true,name-canonical=true,push=${{ github.event_name == 'push' && 'true' || 'false' }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: start elasticsearch
if: github.event_name == 'pull_request'
run: docker compose -f docker/docker-compose-elastic.yml elasticsearch up -d --wait
- name: test image using index creation
if: github.event_name == 'pull_request'
working-directory: example-apps/chatbot-rag-app
run: |
cp env.example .env
docker compose run --rm -T create-index
- name: export digest
if: github.event_name == 'push'
run: |
Expand All @@ -75,6 +66,30 @@ jobs:
if-no-files-found: error
retention-days: 1

# This tests the chatbot-rag-app image by running the create-index command.
# This command only relies on Elasticsearch, and verifies ELSER is working.
test-image:
strategy:
matrix:
runner:
- ubuntu-24.04
- ubuntu-24.04-arm
needs: build-image
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: start elasticsearch
run: docker compose -f docker/docker-compose-elastic.yml up elasticsearch -d --wait --wait-timeout 120
- name: test image
working-directory: example-apps/chatbot-rag-app
run: |
echo "Testing image ${IMAGE}"
cp env.example .env
docker compose run --rm -T create-index
env:
IMAGE: ${{ steps.build.outputs.digest }}

push-manifest:
runs-on: ubuntu-24.04
needs: build-image
Expand Down

0 comments on commit 45c819c

Please sign in to comment.