Managed Identity Support for CosmosDB External Scaler (#86) #6
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: Release build | |
| on: | |
| push: | |
| tags: | |
| - v*.*.* | |
| env: | |
| VERSION_TAG: experimental | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup dotnet environment | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8 | |
| - name: Install dependencies | |
| run: dotnet restore src | |
| - name: Build solution | |
| run: dotnet build src --configuration Release --no-restore | |
| - name: Run unit tests | |
| run: dotnet test src --no-restore | |
| - name: Build Docker image for order-generator | |
| uses: docker/build-push-action@v6 | |
| with: | |
| file: ./src/Scaler.Demo/OrderGenerator/Dockerfile | |
| tags: cosmosdb-order-generator:${{ env.VERSION_TAG }} | |
| - name: Build Docker image for order-processor | |
| uses: docker/build-push-action@v6 | |
| with: | |
| file: ./src/Scaler.Demo/OrderProcessor/Dockerfile | |
| tags: cosmosdb-order-processor:${{ env.VERSION_TAG }} | |
| - name: Login to GitHub container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/${{ github.repository_owner }}/external-scaler-azure-cosmos-db | |
| flavor: | | |
| latest=false | |
| tags: | | |
| type=semver,pattern={{version}} | |
| # Using metadata ensures all lower-case tag-name even if the GitHub username has upper-case letters. | |
| - name: Build push Docker image for scaler | |
| uses: docker/build-push-action@v6 | |
| with: | |
| file: ./src/Scaler/Dockerfile | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| push: true |