Skip to content

Commit

Permalink
Always build and push image before running IT (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavgarg1 authored Nov 13, 2024
1 parent fdda45a commit c1eb3dd
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
workflow_dispatch:
push:
branches:
- 'main'
- "main"
tags:
- 'v*'
- "v*"

jobs:
build-test-push-image:
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Install soci
uses: lerentis/[email protected]
with:
soci-release: 'v0.4.0'
soci-release: "v0.4.0"

- name: Set up Docker Buildx
uses: docker/[email protected]
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile # Path to your Dockerfile
file: ./Dockerfile # Path to your Dockerfile
push: false
tags: ${{ steps.meta.outputs.tags }}
load: true
Expand All @@ -124,17 +124,6 @@ jobs:
# docker tag ghcr.io/predibase/lorax:main "$tag"
# done <<< "$tags"


- name: Run integration tests
uses: ./.github/workflows/integration-tests
if: ${{ github.ref == 'refs/heads/main' }}
with:
test_image_tag: ${{ steps.meta.outputs.tags }}
use_local_image: true
github_token: ${{ secrets.GHCR_PAT }}
huggingface_token: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}


- name: Import image in containerd
env:
tag_hash: ${{ steps.vars.outputs.tag_hash }}
Expand All @@ -153,6 +142,15 @@ jobs:
sudo ctr i push --user "${{ github.repository_owner }}:${{ secrets.GHCR_PAT }}" $tag
done
- name: Run integration tests
uses: ./.github/workflows/integration-tests
if: ${{ github.ref == 'refs/heads/main' }}
with:
test_image_tag: ${{ steps.meta.outputs.tags }}
use_local_image: true
github_token: ${{ secrets.GHCR_PAT }}
huggingface_token: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}

- name: Create and push soci index
env:
tags: ${{ steps.meta.outputs.tags }}
Expand Down

0 comments on commit c1eb3dd

Please sign in to comment.