chore(deps): update nuget packages (#73) #42
This file contains 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: Main branch build | |
on: | |
push: | |
branches: | |
- main | |
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: 6 | |
- 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=raw,value=${{ env.VERSION_TAG }} | |
# Using metadata ensures all lower-case tag-name even if the GitHub username has upper-case letters. | |
- name: Build and 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 |