Skip to content

Merge pull request #5 from solita/feature123 #3

Merge pull request #5 from solita/feature123

Merge pull request #5 from solita/feature123 #3

Workflow file for this run

name: Function app build
on:
workflow_dispatch:
pull_request:
branches:
- 'main'
variables:
azureSubscription: ${{ secrets.ARM_SUBSCRIPTION_ID }}
# Function app name
functionAppName: 'clamav'
# Agent VM image name
vmImageName: 'ubuntu-latest'
# Working Directory
workingDirectory: ./function/
stages:
- stage: Build
displayName: Build stage
jobs:

Check failure on line 27 in .github/workflows/function_app.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/function_app.yaml

Invalid workflow file

You have an error in your yaml syntax on line 27
- job: Build
displayName: Build
runs-on: '$(vmImageName)'
- task: UsePythonVersion@0
displayName: 'Use Python 3.10'
inputs:
versionSpec: 3.11
- bash: |
pip install --target="./.python_packages/lib/site-packages" -r ./requirements.txt
workingDirectory: $(workingDirectory)
displayName: 'Install application dependencies'
- task: ArchiveFiles@2
displayName: 'Archive files'
inputs:
rootFolderOrFile: '$(workingDirectory)'
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
replaceExistingArchive: true
- publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
artifact: drop
- stage: Deploy
displayName: Deploy stage
dependsOn: Build
condition: succeeded()
jobs:
- deployment: Deploy
displayName: Deploy
environment: 'development'
runs-on: $(vmImageName)
strategy:
runOnce:
deploy:
steps:
- task: AzureFunctionApp@1
displayName: 'Azure functions app deploy'
inputs:
azureSubscription: '$(azureSubscription)'
appType: functionAppLinux
appName: $(functionAppName)
package: '$(Pipeline.Workspace)/drop/$(Build.BuildId).zip'