Skip to content

Add checking if the time trigger is not too late #66

Add checking if the time trigger is not too late

Add checking if the time trigger is not too late #66

name: Deploy DotNet project to Azure Function App
on:
push:
paths:
- 'src/app/**'
- '.github/workflows/deploy-function-app.yaml'
workflow_dispatch:
env:
AZURE_FUNCTIONAPP_NAME_DEV: 'eit-vms-plc-dev-func-1'
AZURE_FUNCTIONAPP_NAME_PRD: 'eit-vms-plc-prd-func-1'
AZURE_FUNCTIONAPP_PACKAGE_PATH: './src/app/VMStartStop'
DOTNET_VERSION: '8.0.x'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: dev
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v3
# If you want to use Azure RBAC instead of Publish Profile, then uncomment the task below
# - name: 'Login via Azure CLI'
# uses: azure/login@v1
# with:
# creds: ${{ secrets.AZURE_RBAC_CREDENTIALS }} # set up AZURE_RBAC_CREDENTIALS secrets in your repository
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: 'Resolve Project Dependencies Using Dotnet'
shell: bash
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
dotnet build --configuration Release --output ./output
popd
- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME_DEV }}
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output'
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} # Remove publish-profile to use Azure RBAC