Skip to content

Update main_async-job-gb-app.yml #11

Update main_async-job-gb-app.yml

Update main_async-job-gb-app.yml #11

# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy dotnet core app to Azure Function App - async-job-gb-app
on:
push:
branches:
- main
workflow_dispatch:
env:
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
DOTNET_VERSION: '9.0.x' # set this to the dotnet version to use
jobs:
build-and-deploy:
runs-on: windows-latest
permissions:
id-token: write #This is required for requesting the JWT
contents: read #This is required for actions/checkout
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v3
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: 'Build'
run: dotnet publish --configuration Release --output ./output
- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_E1EF897AE64D45C2BD51AF1D96992B6C }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_BEA4CF1B5223483BA187B5F907986C75 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_E108FF24C5D7415486E6B4CB195B587E }}
- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: 'async-job-gb-app'
slot-name: 'Production'
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output'