diff --git a/.github/workflows/build-and-push-image.yml b/.github/workflows/build-and-push-image.yml index 413e0a1..7d23ccf 100644 --- a/.github/workflows/build-and-push-image.yml +++ b/.github/workflows/build-and-push-image.yml @@ -1,4 +1,4 @@ -name: Build and Push Image to Dockerhub and GHCR +name: Build and Push Images to Dockerhub and GHCR on: push: @@ -9,6 +9,9 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + service: [backend, frontend] steps: - name: Checkout uses: actions/checkout@v4 @@ -35,16 +38,19 @@ jobs: with: context: workflow images: | - ericgullickson/motovaultpro - ghcr.io/ericgullickson/motovaultpro + ericgullickson/motovaultpro-${{ matrix.service }} + ghcr.io/ericgullickson/motovaultpro-${{ matrix.service }} tags: | type=raw,value=latest,enable={{is_default_branch}} type=ref,event=tag + labels: | + org.opencontainers.image.title=MotoVaultPro ${{ matrix.service }} + org.opencontainers.image.description=MotoVaultPro ${{ matrix.service }} service - name: Build and push uses: docker/build-push-action@v5 with: - context: . + context: ./${{ matrix.service }} platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }}