From d56f59c2682c51fa281f2f0ee7e37042ab0391c1 Mon Sep 17 00:00:00 2001 From: edinstance Date: Mon, 20 Oct 2025 18:09:14 +0100 Subject: [PATCH 1/2] feat: added service deps to build images --- .github/workflows/build_images.yml | 37 ++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_images.yml b/.github/workflows/build_images.yml index 3b5e811..4fe69f7 100644 --- a/.github/workflows/build_images.yml +++ b/.github/workflows/build_images.yml @@ -26,18 +26,41 @@ jobs: strategy: matrix: - service: [ - "services/flights", - "services/aircraft", - "services/search", - "services/authentication", - "services/gateway" - ] + include: + - service: services/flights + uses_buf: true + - service: services/aircraft + uses_buf: true + needs_app_file: true + - service: services/search + needs_app_file: true + uses_buf: false + - service: services/authentication + uses_buf: false + - service: services/gateway + uses_buf: false steps: + # Checkout code - name: Checkout repository uses: actions/checkout@v4 + # Setup the service dependencies + - name: Install buf + if: matrix.uses_buf + uses: bufbuild/buf-setup-action@v1.50.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Build proto files + if: matrix.uses_buf + run: buf generate --template buf.gen.yaml + + - name: Create aircraft application file + if: matrix.needs_app_file + run: cp services/aircraft/src/main/resources/prod-application.example.yml services/aircraft/src/main/resources/application.yml + + # Build and push the image to GitHub Container Registry - name: Log in to GitHub Container Registry uses: docker/login-action@v3 with: From 948d4e21d3f50b3d1123b4ac6883e9b884f3adaa Mon Sep 17 00:00:00 2001 From: edinstance Date: Mon, 20 Oct 2025 18:23:07 +0100 Subject: [PATCH 2/2] fix: make application file service aware --- .github/workflows/build_images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_images.yml b/.github/workflows/build_images.yml index 4fe69f7..1348ad0 100644 --- a/.github/workflows/build_images.yml +++ b/.github/workflows/build_images.yml @@ -56,9 +56,9 @@ jobs: if: matrix.uses_buf run: buf generate --template buf.gen.yaml - - name: Create aircraft application file + - name: Create application file if: matrix.needs_app_file - run: cp services/aircraft/src/main/resources/prod-application.example.yml services/aircraft/src/main/resources/application.yml + run: cp ${{ matrix.service }}/src/main/resources/prod-application.example.yml ${{ matrix.service }}/src/main/resources/application.yml # Build and push the image to GitHub Container Registry - name: Log in to GitHub Container Registry