Fix container build workflow

This commit is contained in:
Eric Gullickson
2025-08-23 10:31:30 -05:00
parent dc26c68d6f
commit 1053b8a2e1

View File

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