Fix sitemap.xml 404 on Azure Container Apps (nginx missing explicit route) #462
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Push Docker Images | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/services/**' | |
| - 'src/portal/**' | |
| - 'src/site/**' | |
| - 'containers/**' | |
| - '.github/workflows/docker-build.yml' | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/services/**' | |
| - 'src/portal/**' | |
| - 'src/site/**' | |
| - 'containers/**' | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_PREFIX: aurelianware/cloudhealthoffice | |
| jobs: | |
| build-services: | |
| name: Build Microservices | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| fail-fast: false # Build all services to see all errors | |
| matrix: | |
| service: | |
| - member-service | |
| - coverage-service | |
| - claims-service | |
| - eligibility-service | |
| - authorization-service | |
| - attachment-service | |
| - provider-service | |
| - benefit-plan-service | |
| - reference-data-service | |
| - sponsor-service | |
| - claims-scrubbing-service | |
| - tenant-service | |
| - enrollment-import-service | |
| - trading-partner-service | |
| include: | |
| # tenant-service needs repo root as context so it can reach scripts/setup/ | |
| - service: tenant-service | |
| build_context: '.' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-${{ matrix.service }} | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=sha,prefix=sha- | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ${{ matrix.build_context || format('./src/services/{0}', matrix.service) }} | |
| file: ./src/services/${{ matrix.service }}/Dockerfile | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| platforms: linux/amd64 | |
| build-portal: | |
| name: Build Blazor Portal | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-portal | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=sha,prefix=sha- | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./src/portal/CloudHealthOffice.Portal | |
| file: ./src/portal/CloudHealthOffice.Portal/Dockerfile | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| platforms: linux/amd64 | |
| build-site: | |
| name: Build Static Site | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-site | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=sha,prefix=sha- | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./src/site | |
| file: ./src/site/Dockerfile | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| platforms: linux/amd64 | |
| build-containers: | |
| name: Build Utility Containers | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| container: | |
| - x12-parser | |
| - x12-276-parser | |
| - claims-publisher | |
| - kafka-publisher | |
| - sftp-fetcher | |
| - x12-encoder | |
| - metadata-extractor | |
| - x12-834-parser | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-${{ matrix.container }} | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=sha,prefix=sha- | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Check if Dockerfile exists | |
| id: check | |
| run: | | |
| if [ -f "./containers/${{ matrix.container }}/Dockerfile" ]; then | |
| echo "exists=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "exists=false" >> $GITHUB_OUTPUT | |
| echo "⚠️ Dockerfile not found for ${{ matrix.container }}" | |
| fi | |
| - name: Build and push | |
| if: steps.check.outputs.exists == 'true' | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./containers/${{ matrix.container }} | |
| file: ./containers/${{ matrix.container }}/Dockerfile | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| platforms: linux/amd64 | |
| summary: | |
| name: Build Summary | |
| runs-on: ubuntu-latest | |
| needs: [build-services, build-portal, build-site, build-containers] | |
| if: always() | |
| steps: | |
| - name: Check build results | |
| run: | | |
| echo "## Docker Image Build Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ **All images built successfully**" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Images pushed to: \`ghcr.io/aurelianware/cloudhealthoffice-*\`" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Services Built:" >> $GITHUB_STEP_SUMMARY | |
| echo "- member-service" >> $GITHUB_STEP_SUMMARY | |
| echo "- coverage-service" >> $GITHUB_STEP_SUMMARY | |
| echo "- claims-service" >> $GITHUB_STEP_SUMMARY | |
| echo "- eligibility-service" >> $GITHUB_STEP_SUMMARY | |
| echo "- authorization-service" >> $GITHUB_STEP_SUMMARY | |
| echo "- provider-service" >> $GITHUB_STEP_SUMMARY | |
| echo "- benefit-plan-service" >> $GITHUB_STEP_SUMMARY | |
| echo "- reference-data-service" >> $GITHUB_STEP_SUMMARY | |
| echo "- sponsor-service" >> $GITHUB_STEP_SUMMARY | |
| echo "- claims-scrubbing-service" >> $GITHUB_STEP_SUMMARY | |
| echo "- tenant-service" >> $GITHUB_STEP_SUMMARY | |
| echo "- enrollment-import-service" >> $GITHUB_STEP_SUMMARY | |
| echo "- portal (Blazor)" >> $GITHUB_STEP_SUMMARY | |
| echo "- site (Static)" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Utility Containers Built:" >> $GITHUB_STEP_SUMMARY | |
| echo "- x12-parser (837 claims parsing)" >> $GITHUB_STEP_SUMMARY | |
| echo "- x12-276-parser (276 claim status inquiry parsing)" >> $GITHUB_STEP_SUMMARY | |
| echo "- x12-834-parser (834 enrollment parsing)" >> $GITHUB_STEP_SUMMARY | |
| echo "- claims-publisher (Kafka)" >> $GITHUB_STEP_SUMMARY | |
| echo "- kafka-publisher" >> $GITHUB_STEP_SUMMARY | |
| echo "- sftp-fetcher" >> $GITHUB_STEP_SUMMARY | |
| echo "- x12-encoder" >> $GITHUB_STEP_SUMMARY | |
| echo "- metadata-extractor" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Next Steps:" >> $GITHUB_STEP_SUMMARY | |
| echo "1. Deploy Kafka topics: \`kubectl apply -f kafka/topics.yaml\`" >> $GITHUB_STEP_SUMMARY | |
| echo "2. Deploy Argo workflows: \`kubectl apply -f argo-workflows/\`" >> $GITHUB_STEP_SUMMARY | |
| echo "3. Deploy Argo Events: \`kubectl apply -f argo-events/\`" >> $GITHUB_STEP_SUMMARY | |
| echo "4. Deploy services: \`kubectl apply -f services/*/k8s/\`" >> $GITHUB_STEP_SUMMARY | |
| echo "5. Test 834 pipeline: Upload test-x12-834-enrollment-sample.edi to SFTP" >> $GITHUB_STEP_SUMMARY |