diff --git a/.github/workflows/build_images.yml b/.github/workflows/build_images.yml index 3b5e811..1348ad0 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 application file + if: matrix.needs_app_file + 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 uses: docker/login-action@v3 with: