From 420574f0dd4b442bf8e2055c42dd3ffa8a9824bc Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Mon, 9 Dec 2024 14:36:58 +0000 Subject: [PATCH] fix: download git models before publishing image --- .github/workflows/image-publish.yml | 10 +++++++--- Dockerfile | 1 - 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/image-publish.yml b/.github/workflows/image-publish.yml index 2d549277..38467aa9 100644 --- a/.github/workflows/image-publish.yml +++ b/.github/workflows/image-publish.yml @@ -2,7 +2,7 @@ name: Publish Docker Image on: schedule: # Once weekly on fridays at noon - - cron: '00 12 * * 5' + - cron: "00 12 * * 5" workflow_dispatch: jobs: @@ -20,9 +20,9 @@ jobs: - name: Checkout uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - name: Set up QEMU for cross-platform builds - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3 + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3 + uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3 - name: Compute version number id: version-string run: | @@ -67,6 +67,10 @@ jobs: echo "LATEST_COMMIT_SHA=$(curl -LSsk 'https://api.github.com/repos/stacklok/codegate-ui/commits?per_page=1' -H 'Authorization: Bearer ${{ secrets.GH_CI_TOKEN }}' | jq -r '.[0].sha')" >> $GITHUB_ENV - name: Rename to accomodate to image run: mv ./backup_weaviate ./weaviate_backup + - name: Download git lfs dependencies + run: | + git lfs install + git lfs pull - name: Build image id: image-build uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v5 diff --git a/Dockerfile b/Dockerfile index b2925ed9..d924ea1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,7 +66,6 @@ FROM python:3.12-slim AS runtime RUN apt-get update && apt-get install -y --no-install-recommends \ libgomp1 \ nginx \ - vim \ && rm -rf /var/lib/apt/lists/* # Create a non-root user