Skip to content

catalog-service-ci-cd #3

catalog-service-ci-cd

catalog-service-ci-cd #3

name: catalog-service-ci-cd
on:
push:
branches:
- master
paths:
- src/services/catalog-service/api/**
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
tags:
description: 'Test scenario tags'
required: false
type: boolean
environment:
description: 'Environment to run tests against'
type: environment
required: true
env:
Appservice: catalog-api-staging
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: "8.0.x"
- name: Build with dotnet
run: dotnet build ${{ github.workspace }}/src/services/catalog-service/api/catalog-service.csproj --configuration Release
- name: dotnet publish
run: dotnet publish ${{ github.workspace }}/src/services/catalog-service/api/catalog-service.csproj -c Release -o ${{env.DOTNET_ROOT}}/api
- name: Deploy to Azure Web App
uses: Azure/webapps-deploy@v3.0.1
with:
app-name: food-catalog-api-yaml
publish-profile: ${{ secrets.CATALOG_SERVICE_PUBLISH }}
package: ${{env.DOTNET_ROOT}}/api