Skip to content

Function App Deploy

Function App Deploy #9

name: Function App Deploy
on:
workflow_dispatch:
inputs:
tag:
description: 'App Tag to deploy'
required: true
default: 'v1.0.0'
workspace:
description: 'Environment to deploy to'
required: true
default: 'Dev'
type: choice
options:
- Dev
- Test
- Pre-Prod
- Prod
- Load-Test
jobs:
build:
name: 'Function App Deploy'
runs-on: ubuntu-latest
environment: ${{ inputs.workspace }}
steps:
- name: Sign in to Azure
uses: azure/login@v1
with:
creds: '{"clientId":"${{ secrets.FAD_CLIENT_ID }}","clientSecret":"${{ secrets.FAD_CLIENT_SECRET }}","subscriptionId":"${{ secrets.FAD_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.FAD_TENANT_ID }}"}'
- name: Fetch release
run: wget https://github.com/${{ github.repository }}/releases/download/${{ inputs.tag }}/${{ inputs.tag }}.build.zip
- name: Deploy Function App
run: az functionapp deployment source config-zip --name ${{ vars.FAD_FUNCTION_APP_NAME }} --resource-group ${{ vars.FAD_RESOURCE_GROUP }} --src ${{ inputs.tag }}.build.zip