add s3 kv store #412
Workflow file for this run
This file contains hidden or 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
| # Copyright 2021 The MLX Contributors | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Build MLX API and UI images | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| # Run tests for any PRs. | |
| pull_request: | |
| env: | |
| GITHUB_ACTION: "true" | |
| DOCKER_REGISTRY: mlexchange | |
| UI_IMAGE_TAG: nightly-origin-main | |
| API_IMAGE_TAG: nightly-main | |
| jobs: | |
| python-flake8: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [3.7] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: pip install flake8 | |
| - name: "Python flake8 check" | |
| run: flake8 . --count --exclude=./api/server/swagger_server/code_templates --select=E9,F63,F7,F82 --show-source --statistics | |
| ui-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: docker/setup-qemu-action@v1 | |
| - uses: docker/setup-buildx-action@v1 | |
| # Only login when pushing to main branch | |
| - uses: docker/login-action@v1 | |
| if: github.event_name == 'push' | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Get the version | |
| id: get_version | |
| run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | |
| - uses: docker/build-push-action@v2 | |
| if: github.event_name != 'push' | |
| with: | |
| context: dashboard/origin-mlx | |
| push: false | |
| file: dashboard/origin-mlx/Dockerfile | |
| tags: ${{ env.DOCKER_REGISTRY }}/mlx-ui:${{ env.UI_IMAGE_TAG }} | |
| - uses: docker/build-push-action@v2 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| with: | |
| context: dashboard/origin-mlx | |
| push: true | |
| file: dashboard/origin-mlx/Dockerfile | |
| tags: ${{ env.DOCKER_REGISTRY }}/mlx-ui:${{ env.UI_IMAGE_TAG }} | |
| - uses: docker/build-push-action@v2 | |
| if: github.event_name == 'push' && github.ref != 'refs/heads/main' | |
| with: | |
| context: dashboard/origin-mlx | |
| push: true | |
| file: dashboard/origin-mlx/Dockerfile | |
| tags: ${{ env.DOCKER_REGISTRY }}/mlx-ui:${{ steps.get_version.outputs.VERSION }} | |
| api-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: docker/setup-qemu-action@v1 | |
| - uses: docker/setup-buildx-action@v1 | |
| # Only login when pushing to main branch | |
| - uses: docker/login-action@v1 | |
| if: github.event_name == 'push' | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Get the version | |
| id: get_version | |
| run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | |
| - uses: docker/build-push-action@v2 | |
| if: github.event_name != 'push' | |
| with: | |
| context: api/server | |
| push: false | |
| file: api/server/Dockerfile | |
| tags: ${{ env.DOCKER_REGISTRY }}/mlx-api:${{ env.API_IMAGE_TAG }} | |
| - uses: docker/build-push-action@v2 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| with: | |
| context: api/server | |
| push: true | |
| file: api/server/Dockerfile | |
| tags: ${{ env.DOCKER_REGISTRY }}/mlx-api:${{ env.API_IMAGE_TAG }} | |
| - uses: docker/build-push-action@v2 | |
| if: github.event_name == 'push' && github.ref != 'refs/heads/main' | |
| with: | |
| context: api/server | |
| push: true | |
| file: api/server/Dockerfile | |
| tags: ${{ env.DOCKER_REGISTRY }}/mlx-api:${{ steps.get_version.outputs.VERSION }} |