ci(workflow): add sleep model and update test #65
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: Build and Push Test Images | |
on: | |
workflow_dispatch: | |
workflow_call: | |
push: | |
branches: | |
- main | |
paths: | |
- "assets/model-**" | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "assets/model-**" | |
jobs: | |
build-push-test-image: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
model: | |
[ | |
"dummy-cls", | |
"dummy-det", | |
# "dummy-image-to-image", | |
"dummy-instance-segmentation", | |
"dummy-keypoint", | |
"dummy-semantic-segmentation", | |
"dummy-completion", | |
"dummy-chat", | |
"dummy-text-to-image", | |
"dummy-multimodal-chat", | |
"dummy-multimodal-chat-with-sleep", | |
"dummy-text-embedding", | |
"dummy-multimodal-embedding", | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.botGitHubToken }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install Instill Python SDK | |
run: pip install --pre instill-sdk | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
id: builder | |
with: | |
driver-opts: image=moby/buildkit:master | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: dropletbot | |
password: ${{ secrets.botDockerHubPassword }} | |
- name: Determine Docker tag | |
id: tag | |
run: | | |
if [ "${{ github.ref_name }}" == "main" ]; then | |
echo "tag=latest" >> $GITHUB_ENV | |
else | |
echo "tag=dev" >> $GITHUB_ENV | |
fi | |
- name: Build test models | |
working-directory: ./assets/model-${{ matrix.model }} | |
run: instill build instill/${{ matrix.model }} -t ${{ env.tag }} | |
- name: Push test models | |
working-directory: ./assets/model-${{ matrix.model }} | |
run: instill push instill/${{ matrix.model }} -t ${{ env.tag }} -u docker.io |