Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fosol committed Dec 4, 2023
1 parent e44e7a6 commit 8734401
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/ci-cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ env:
IMAGE_REGISTRY_USER: ${{ github.actor }}
IMAGE_REGISTRY_PASSWORD: ${{ github.token }}

REPO_NAME: hsb-dashboard
API_IMAGE_NAME: api
APP_IMAGE_NAME: dashboard
DB_MIGRATION_IMAGE_NAME: db-migration
Expand Down Expand Up @@ -58,18 +57,20 @@ jobs:
with:
filters: |
api:
- '.github/workflows/**'
- 'src/api/**'
- 'src/libs/**'
dashboard:
- '.github/workflows/**'
- 'src/dashboard/**'
db-migration:
- '.github/workflows/**'
- 'src/libs/dal/**'
## BUILD
- name: Build API
id: build-api
uses: redhat-actions/buildah-build@v2
if: steps.filter.outputs.api == 'true'
with:
image: ${{ env.API_IMAGE_NAME }}
image: ${{ github.event.repository.name }}/${{ env.API_IMAGE_NAME }}
tags: ${{ env.IMAGE_TAG }} ${{ env.VERSION }} ${{ env.DEPLOY_TO }}
context: .
dockerfiles: |
Expand All @@ -78,8 +79,9 @@ jobs:
- name: Build Dasbhoard
id: build-app
uses: redhat-actions/buildah-build@v2
if: steps.filter.outputs.dashboard == 'true'
with:
image: ${{ env.APP_IMAGE_NAME }}
image: ${{ github.event.repository.name }}/${{ env.APP_IMAGE_NAME }}
tags: ${{ env.IMAGE_TAG }} ${{ env.VERSION }} ${{ env.DEPLOY_TO }}
context: src/dashboard
dockerfiles: |
Expand All @@ -88,8 +90,9 @@ jobs:
- name: Build DB Migration
id: build-db-migration
uses: redhat-actions/buildah-build@v2
if: steps.filter.outputs.db-migration == 'true'
with:
image: ${{ env.DB_MIGRATION_IMAGE_NAME }}
image: ${{ github.event.repository.name }}/${{ env.DB_MIGRATION_IMAGE_NAME }}
tags: ${{ env.IMAGE_TAG }} ${{ env.VERSION }} ${{ env.DEPLOY_TO }}
context: src/libs
dockerfiles: |
Expand All @@ -98,26 +101,29 @@ jobs:
## PUSH TO REGISTRY
- name: Push API to registry
uses: redhat-actions/push-to-registry@v2
if: steps.filter.outputs.api == 'true'
with:
image: ${{ env.REPO_NAME }}/${{ steps.build-api.outputs.image }}
image: ${{ steps.build-api.outputs.image }}
tags: ${{ steps.build-api.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.IMAGE_REGISTRY_USER }}
password: ${{ env.IMAGE_REGISTRY_PASSWORD }}

- name: Push Dashboard to registry
uses: redhat-actions/push-to-registry@v2
if: steps.filter.outputs.dashboard == 'true'
with:
image: ${{ env.REPO_NAME }}/${{ steps.build-app.outputs.image }}
image: ${{ steps.build-app.outputs.image }}
tags: ${{ steps.build-app.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.IMAGE_REGISTRY_USER }}
password: ${{ env.IMAGE_REGISTRY_PASSWORD }}

- name: Push DB Migration to registry
uses: redhat-actions/push-to-registry@v2
if: steps.filter.outputs.db-migration == 'true'
with:
image: ${{ env.REPO_NAME }}/${{ steps.build-db-migration.outputs.image }}
image: ${{ steps.build-db-migration.outputs.image }}
tags: ${{ steps.build-db-migration.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.IMAGE_REGISTRY_USER }}
Expand Down

0 comments on commit 8734401

Please sign in to comment.