Skip to content

Commit

Permalink
201 configure azure infrastructure (#223)
Browse files Browse the repository at this point in the history
* Update Azure infrastructure workflow to include validation step and what-if deployment
  • Loading branch information
mlhaufe authored Jul 25, 2024
1 parent 4dd51d2 commit 4ec50a8
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/azure-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,32 @@ on:
# deployment:

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Lint Bicep
run: |
az bicep build ./azure/bicep/main.bicep
- name: Run what-if
uses: azure/arm-deploy@v1
with:
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resourceGroupName: ${{ secrets.AZURE_RG }}
template: ./azure/bicep/main.bicep
parameters: 'environment=prod '
scope: 'resourcegroup'
failOnStdErr: false
additionalArguments: --what-if
bicep-deploy:
needs: validate
environment: azure-prod
runs-on: ubuntu-latest
steps:
Expand All @@ -24,9 +49,10 @@ jobs:
- name: Deploy Bicep
uses: azure/arm-deploy@v1
with:
deploymentName: ${{ github.run_number }}
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resourceGroupName: ${{ secrets.AZURE_RG }}
template: ./azure/bicep/main.bicep
parameters: 'environment=prod '
scope: 'resourcegroup'
failOnStdErr: true
failOnStdErr: false

0 comments on commit 4ec50a8

Please sign in to comment.