diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c090325..04b66a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,11 @@ on: types: [created] permissions: actions: write + +env: + REGISTRY: ghcr.io + IMAGE_NAME: "ghcr.io/amikos-tech/chromadb-ops/chops" + jobs: build-n-publish: runs-on: ubuntu-latest @@ -40,5 +45,33 @@ jobs: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} poetry publish -n --build shell: bash -# poetry config repositories.publish ${{ inputs.PUBLISH_REGISTRY }} -# poetry publish -p ${{ secrets.PYPI_API_TOKEN }} -u ${{ inputs.PUBLISH_REGISTRY_USERNAME }} -r publish --build + build-images: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.IMAGE_NAME }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push release Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + push: true + platforms: linux/amd64,linux/arm64 + tags: "${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }},${{ env.IMAGE_NAME }}:latest" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9f2fb09..52bba64 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -2,9 +2,13 @@ on: push: branches: - main + paths: + - chroma_ops/** pull_request: branches: - main + paths: + - chroma_ops/** jobs: test: