diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b87ec39..c8ebd49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,10 @@ name: CI on: push: + branches: + - '**' + tags-ignore: + - '**' jobs: backend-format: diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 92ef781..30b7edb 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,4 +1,4 @@ -name: Build and Push Backend Image +name: Build and Push Images on: push: @@ -8,6 +8,15 @@ on: jobs: build-and-push: runs-on: ubuntu-latest + strategy: + matrix: + include: + - name: backend + context: backend + package: modai-chat-backend + - name: frontend + context: frontend_omni + package: modai-chat-frontend permissions: contents: read packages: write @@ -28,14 +37,14 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ghcr.io/${{ github.repository_owner }}/modai-chat-backend + images: ghcr.io/${{ github.repository_owner }}/${{ matrix.package }} tags: | type=raw,value=latest - name: Build and push Docker image uses: docker/build-push-action@v6 with: - context: backend + context: ${{ matrix.context }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -46,6 +55,13 @@ jobs: name: Cleanup Untagged Images runs-on: ubuntu-latest needs: build-and-push + strategy: + matrix: + include: + - name: backend + package: modai-chat-backend + - name: frontend + package: modai-chat-frontend permissions: packages: write steps: @@ -53,3 +69,4 @@ jobs: uses: dataaxiom/ghcr-cleanup-action@v1 with: delete-untagged: true + package: ${{ matrix.package }}