зеркало из https://github.com/Azure/CCOInsights.git
Create ado-contributions.yml
This commit is contained in:
Родитель
5001f851a5
Коммит
28c697acee
|
@ -0,0 +1,54 @@
|
|||
name: "ADO Contributions"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
resourceGroupName:
|
||||
type: string
|
||||
description: "Resource Group where infrastructure will be deployed/updated"
|
||||
required: true
|
||||
default: ""
|
||||
|
||||
jobs:
|
||||
deploy_dashboard:
|
||||
runs-on: windows-2022
|
||||
name: "Dashboard Backend"
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Azure Login
|
||||
uses: Azure/login@v1
|
||||
with:
|
||||
creds: ${{ secrets.AZURE_CREDENTIALS }}
|
||||
enable-AzPSSession: true
|
||||
- name: "Deploy infrastructure"
|
||||
id: rg
|
||||
uses: azure/arm-deploy@v1
|
||||
with:
|
||||
deploymentName: ${{ github.event.inputs.resourceGroupName }}
|
||||
resourceGroupName: ${{ github.event.inputs.resourceGroupName }}
|
||||
template: ./dashboards/ADODashboard-Contributors/infrastructure/deploy.bicep
|
||||
- name: "Replace tokens"
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ConvertTokenListFunctionInput = @{
|
||||
FilePath = './dashboards/ADODashboard-Contributors/src/local.settings.json'
|
||||
TokenName = '<<PAT>>'
|
||||
TokenValue = '${{ secrets.PAT }}'
|
||||
}
|
||||
./tools/scripts/Convert-TokenInFile.ps1 @ConvertTokenListFunctionInput -Verbose
|
||||
- name: "Deploy code"
|
||||
shell: pwsh
|
||||
run: |
|
||||
# Initialize parameters
|
||||
Install-Module -Name Az.Functions -Force
|
||||
$functionApp = Get-AzFunctionApp -ResourceGroupName '${{ github.event.inputs.resourceGroupName }}'
|
||||
$functionAppName = $functionApp[0].Name
|
||||
$DeployFunctionInputs = @{
|
||||
ResourceGroup = '${{ github.event.inputs.resourceGroupName }}'
|
||||
FunctionAppName = $functionAppName
|
||||
}
|
||||
# Invoke Function
|
||||
./tools/scripts/deploy-function.ps1 @DeployFunctionInputs -Verbose
|
Загрузка…
Ссылка в новой задаче