Skip to content

Commit

Permalink
Add merge_group to PRs, update workflows to use matrix strategy (#719)
Browse files Browse the repository at this point in the history
* Add `merge_group` to PRs

* Use matrix
  • Loading branch information
cecheta authored Apr 22, 2024
1 parent 62ed9b2 commit cf56374
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 49 deletions.
37 changes: 12 additions & 25 deletions .github/workflows/build-with-push-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,22 @@ on:
branches: [main]

jobs:
docker-build-admin:
docker-build:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
include:
- app_name: rag-adminwebapp
dockerfile: docker/Admin.Dockerfile
- app_name: rag-backend
dockerfile: docker/Backend.Dockerfile
- app_name: rag-webapp
dockerfile: docker/Frontend.Dockerfile
uses: ./.github/workflows/build-docker.yml
with:
registry: fruoccopublic.azurecr.io
username: fruoccopublic
app_name: rag-adminwebapp
dockerfile: docker/Admin.Dockerfile
push: true
secrets: inherit

docker-build-backend:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/build-docker.yml
with:
registry: fruoccopublic.azurecr.io
username: fruoccopublic
app_name: rag-backend
dockerfile: docker/Backend.Dockerfile
push: true
secrets: inherit

docker-build-frontend:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/build-docker.yml
with:
registry: fruoccopublic.azurecr.io
username: fruoccopublic
app_name: rag-webapp
dockerfile: docker/Frontend.Dockerfile
app_name: ${{ matrix.app_name }}
dockerfile: ${{ matrix.dockerfile }}
push: true
secrets: inherit
37 changes: 13 additions & 24 deletions .github/workflows/build-without-push-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,24 @@ on:
- ready_for_review
- reopened
- synchronize

merge_group:

jobs:
docker-build-without-push-frontend:
docker-build:
strategy:
matrix:
include:
- app_name: rag-adminwebapp
dockerfile: docker/Admin.Dockerfile
- app_name: rag-backend
dockerfile: docker/Backend.Dockerfile
- app_name: rag-webapp
dockerfile: docker/Frontend.Dockerfile
uses: ./.github/workflows/build-docker.yml
with:
registry: fruoccopublic.azurecr.io
username: fruoccopublic
app_name: rag-webapp
dockerfile: docker/Frontend.Dockerfile
app_name: ${{ matrix.app_name }}
dockerfile: ${{ matrix.dockerfile }}
push: false
secrets: inherit

docker-build-without-push-backend:
uses: ./.github/workflows/build-docker.yml
with:
registry: fruoccopublic.azurecr.io
username: fruoccopublic
app_name: rag-backend
dockerfile: docker/Backend.Dockerfile
push: false
secrets: inherit

docker-build-without-push-admin:
uses: ./.github/workflows/build-docker.yml
with:
registry: fruoccopublic.azurecr.io
username: fruoccopublic
app_name: rag-backend
dockerfile: docker/Admin.Dockerfile
push: false
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- reopened
- synchronize
workflow_call:
merge_group:

jobs:
test_package:
Expand Down

0 comments on commit cf56374

Please sign in to comment.