This commit is contained in:
Marvin Buss 2020-08-07 17:13:47 +02:00
Родитель 037479892e
Коммит 4887165673
4 изменённых файлов: 55 добавлений и 3 удалений

52
.github/workflows/dataHubDeployment.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,52 @@
name: Data Hub Deployment
on:
push:
branches: [ master ]
paths:
- 'infra/KeyVault/**'
- 'infra/PrivateEndpoint/**'
- '.github/workflows/dataHubDeployment.yml'
env:
AZURE_RESOURCE_GROUP: datahub-mgmt
AZURE_LOCATION: northeurope
jobs:
deployment:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check Out Repository
id: checkout_repository
uses: actions/checkout@v2
# Login to Azure
- name: Azure Login
id: azure_login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
# Create resource group
- name: Create resource group
uses: azure/CLI@v1
with:
azcliversion: latest
inlineScript: |
echo "Creating resource group ${{ env.AZURE_RESOURCE_GROUP }}"
az group create --location ${{ env.AZURE_LOCATION }} --name ${{ env.AZURE_RESOURCE_GROUP }}
# Deploy key vault
- name: Deploy key vault
uses: azure/CLI@v1
with:
azcliversion: latest
inlineScript: |
echo "Creating deployment in resource group"
az deployment group create \
--resource-group ${{ env.AZURE_RESOURCE_GROUP }} \
--template-file $GITHUB_WORKSPACE/infra/KeyVault/deploy.keyVault.json \
--parameters $GITHUB_WORKSPACE/infra/KeyVault/params.keyVault001.json