Add YARP support for static file serving and reverse proxy; update Do… #37
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: Aspire Publish Pipeline | |
| on: | |
| push: | |
| branches: ['*'] # Trigger on any branch | |
| pull_request: | |
| branches: ['*'] # Trigger on any branch | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '9.x' | |
| - name: Install Aspire CLI | |
| run: dotnet tool install --global aspire.cli | |
| - name: Run Aspire Publish | |
| run: aspire publish -p docker-compose -o artifacts | |
| working-directory: AIChat.AppHost | |
| - name: Log in to GitHub Container Registry | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Tag and Push Container Images | |
| run: | | |
| BUILD_NUMBER=${{ github.run_number }} | |
| BRANCH_NAME=${{ github.ref_name }} | |
| SANITIZED_BRANCH_NAME=$(echo "$BRANCH_NAME" | sed 's#[^a-zA-Z0-9._-]#-#g') | |
| for image in chatui chatapi; do | |
| docker tag $image:latest ghcr.io/${{ github.repository_owner }}/$image:${SANITIZED_BRANCH_NAME}-${BUILD_NUMBER} | |
| docker push ghcr.io/${{ github.repository_owner }}/$image:${SANITIZED_BRANCH_NAME}-${BUILD_NUMBER} | |
| done |