From 044634c8e98860777df559bdf6ab73eb9532eccf Mon Sep 17 00:00:00 2001 From: Emil Balitzki Date: Sun, 9 Jun 2024 22:14:27 +0200 Subject: [PATCH] Fixed github action build part 1 Signed-off-by: Emil Balitzki --- .github/workflows/deploy_production.yml | 29 +++++++++---------------- .github/workflows/deploy_test.yml | 29 +++++++++---------------- 2 files changed, 20 insertions(+), 38 deletions(-) diff --git a/.github/workflows/deploy_production.yml b/.github/workflows/deploy_production.yml index 25857a2c..626ed16a 100644 --- a/.github/workflows/deploy_production.yml +++ b/.github/workflows/deploy_production.yml @@ -20,26 +20,17 @@ jobs: strategy: matrix: service: - [ - frontend, - api-gateway, - api-composer, - datapipeline, - sql-database, - metadata-database, - ] - include: - - service: frontend + - name: frontend context: ./frontend - - service: api-gateway + - name: api-gateway context: ./backend/api-gateway - - service: api-composer + - name: api-composer context: ./backend/src/BIE.Core - - service: datapipeline + - name: datapipeline context: ./backend/src/BIE.DataPipeline - - service: sql-database + - name: sql-database context: ./backend/sql-database - - service: metadata-database + - name: metadata-database context: ./backend/metadata-database steps: @@ -53,11 +44,11 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata for Docker - ${{ matrix.service }} + - name: Extract metadata for Docker - ${{ matrix.service.name }} id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.service }} + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.service.name }} tags: | type=ref,event=tag type=sha @@ -65,10 +56,10 @@ jobs: labels: | stage=${{ env.STAGE }} - - name: Build and Publish Docker Image - ${{ matrix.service }} + - name: Build and Publish Docker Image - ${{ matrix.service.name }} uses: docker/build-push-action@v5 with: - context: ${{ matrix.context }} + context: ${{ matrix.service.context }} file: Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/deploy_test.yml b/.github/workflows/deploy_test.yml index 6f47ea83..2f541ce2 100644 --- a/.github/workflows/deploy_test.yml +++ b/.github/workflows/deploy_test.yml @@ -20,26 +20,17 @@ jobs: strategy: matrix: service: - [ - frontend, - api-gateway, - api-composer, - datapipeline, - sql-database, - metadata-database, - ] - include: - - service: frontend + - name: frontend context: ./frontend - - service: api-gateway + - name: api-gateway context: ./backend/api-gateway - - service: api-composer + - name: api-composer context: ./backend/src/BIE.Core - - service: datapipeline + - name: datapipeline context: ./backend/src/BIE.DataPipeline - - service: sql-database + - name: sql-database context: ./backend/sql-database - - service: metadata-database + - name: metadata-database context: ./backend/metadata-database steps: @@ -53,11 +44,11 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata for Docker - ${{ matrix.service }} + - name: Extract metadata for Docker - ${{ matrix.service.name }} id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.service }} + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.service.name }} tags: | type=ref,event=tag type=sha @@ -65,10 +56,10 @@ jobs: labels: | stage=${{ env.STAGE }} - - name: Build and Publish Docker Image - ${{ matrix.service }} + - name: Build and Publish Docker Image - ${{ matrix.service.name }} uses: docker/build-push-action@v5 with: - context: ${{ matrix.context }} + context: ${{ matrix.service.context }} file: Dockerfile push: true tags: ${{ steps.meta.outputs.tags }}