🐛 Fix gha again...
This commit is contained in:
23
.github/workflows/docker-build.yml
vendored
23
.github/workflows/docker-build.yml
vendored
@@ -13,16 +13,25 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
# Define a matrix to run this job for each microservice
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
service: [Sphere, Pass, Ring, Drive, Develop] # Add your service names here
|
include:
|
||||||
|
- service: Sphere
|
||||||
|
image: sphere
|
||||||
|
- service: Pass
|
||||||
|
image: pass
|
||||||
|
- service: Ring
|
||||||
|
image: ring
|
||||||
|
- service: Drive
|
||||||
|
image: drive
|
||||||
|
- service: Develop
|
||||||
|
image: develop
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4 # Use the latest version
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Required for NBGV
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup NBGV
|
- name: Setup NBGV
|
||||||
uses: dotnet/nbgv@master
|
uses: dotnet/nbgv@master
|
||||||
@@ -42,11 +51,9 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
# Dynamically set the Dockerfile path based on the matrix service name
|
|
||||||
file: DysonNetwork.${{ matrix.service }}/Dockerfile
|
file: DysonNetwork.${{ matrix.service }}/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
# Create two tags: one with the version number and one with 'latest'
|
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ lower(github.repository_owner) }}/dyson-${{ lower(matrix.service) }}:${{ steps.nbgv.outputs.SimpleVersion }}
|
ghcr.io/${{ github.repository_owner }}/dyson-${{ matrix.image }}:${{ steps.nbgv.outputs.SimpleVersion }}
|
||||||
ghcr.io/${{ lower(github.repository_owner) }}/dyson-${{ lower(matrix.service) }}:latest
|
ghcr.io/${{ github.repository_owner }}/dyson-${{ matrix.image }}:latest
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
|
Reference in New Issue
Block a user