Fix container build workflow
This commit is contained in:
14
.github/workflows/build-and-push-image.yml
vendored
14
.github/workflows/build-and-push-image.yml
vendored
@@ -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 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user