Skip to content

Commit

Permalink
GitHub Actions with Azure Content
Browse files Browse the repository at this point in the history
  • Loading branch information
johnthebrit committed May 10, 2020
1 parent 71144c2 commit c947e2e
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
27 changes: 27 additions & 0 deletions GitHubActionswithAzure/AzureARMDeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on: [push]

name: AzureARMDeploy

jobs:

deploy:
runs-on: ubuntu-latest
steps:

- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Checkout source code
uses: actions/checkout@v2

- name: Deploy ARM Template
uses: azure/CLI@v1
with:
inlineScript: |
az deployment group create \
--name StorageAccountDeployment \
--resource-group savdevgithubdeploy \
--template-file armtemplates/storageaccount.json \
--parameters storageAccountType=Standard_GRS
48 changes: 48 additions & 0 deletions GitHubActionswithAzure/armtemplates/storageaccount.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS"
],
"metadata": {
"description": "Storage Account Type"
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Location for all resources."
}
}
},
"variables": {
"storageAccountName": "[concat(replace(toLower(resourceGroup().name),'-',''), 'stdsa')]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2019-04-01",
"name": "[variables('storageAccountName')]",
"location": "[parameters('location')]",
"sku": {
"name": "[parameters('storageAccountType')]"
},
"kind": "StorageV2",
"properties": {}
}
],
"outputs": {
"storageAccountName": {
"type": "string",
"value": "[variables('storageAccountName')]"
}
}
}

0 comments on commit c947e2e

Please sign in to comment.