Skip to content

Build params file

Build params file #1

Workflow file for this run

name: Azure Deployment
on:
workflow_call:
inputs:
rg:
type: string
required: true
unique-label:
type: string
required: true
secrets:
azure-client-id:
required: true
azure-tenant-id:
required: true
azure-subscription-id:
required: true
github-pat:
required: true
permissions:
id-token: write
contents: read
jobs:
Deploy-Infrastructure:
# Setup
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@main
- name: azure-login
uses: azure/login@v2
with:
client-id: ${{ secrets.azure-client-id }}
tenant-id: ${{ secrets.azure-tenant-id }}
subscription-id: ${{ secrets.azure-subscription-id }}
- name: azure-cli-verify
uses: azure/cli@v2
with:
azcliversion: latest
inlineScript: |
az account show
- name: setup-dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.0'
# Bicep
- name: bicep-install
run: az bicep upgrade
- name: generate-bicep-parameters
run: |
echo "{
\"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#\",
\"contentVersion\": \"1.0.0.0\",
\"parameters\": {
\"githubPat\": {
\"value\": \"${{ secrets.github-pat }}\"
},
\"uniqueName\": {
\"value\": \"${{ inputs.rg }}\"
}
}
}" > parameters.json
- name: bicep-deploy
uses: azure/arm-deploy@v2
with:
subscriptionId: ${{ secrets.azure-subscription-id }}
resourceGroupName: ${{ inputs.rg }}
template: ./bicep/main.bicep
failOnStdErr: false
parameters: @parameters.json

Check failure on line 81 in .github/workflows/deployment.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deployment.yml

Invalid workflow file

You have an error in your yaml syntax on line 81
deploymentMode: Incremental
# Web App code
- name: bicep-output-webappname
uses: azure/cli@v2
with:
inlineScript: |
#!/bin/bash
outputValue=$( az deployment group show -g ${{ inputs.rg }} --name main --query properties.outputs.webAppName.value -o tsv)
echo "WebAppName=$outputValue" >> $GITHUB_ENV
- name: dotnet-build-publish-webapp
run: |
dotnet restore ./src/Web/Web.csproj
dotnet build ./src/Web/Web.csproj --configuration Release
dotnet publish ./src/Web/Web.csproj -c Release -o './src/Web/output'
- name: azure-deploy-webapp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.WebAppName }}
package: './src/Web/output'
# Function code
- name: bicep-output-functionappname
uses: azure/cli@v2
with:
inlineScript: |
#!/bin/bash
outputValue=$( az deployment group show -g ${{ inputs.rg }} --name main --query properties.outputs.functionAppName.value -o tsv)
echo "FunctionAppName=$outputValue" >> $GITHUB_ENV
- name: dotnet-build-publish-functionapp
run: |
dotnet restore ./src/Workflow/Workflow.csproj
dotnet build ./src/Workflow/Workflow.csproj --configuration Release
dotnet publish ./src/Workflow/Workflow.csproj -c Release -o './src/Workflow/output'
- name: azure-deploy-functionapp
uses: Azure/functions-action@v1.4.8
with:
app-name: ${{ env.FunctionAppName }}
package: './src/Workflow/output'
# Capture and log the Bicep outputs
- name: output-unique-name
run: |
echo "uniqueName: ${{ steps.bicep-deploy.outputs.uniqueName }}"