Deploy Azure resources #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Azure resources | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'infra/**' | |
workflow_dispatch: # Allow manual trigger | |
inputs: | |
branch: | |
description: 'Branch to deploy' | |
required: true | |
default: 'main' | |
jobs: | |
deploy-azure-resources-test: | |
runs-on: ubuntu-latest | |
name: Deploy Azure resources TEST | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Log into Azure | |
uses: azure/login@v2 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Deploy Azure Resources test | |
uses: azure/arm-deploy@v2 | |
with: | |
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }} | |
resourceGroupName: ${{ secrets.AZURE_RG_TEST }} | |
template: infra/main-test.bicep | |
parameters: "sqlServerPassword=${{ secrets.SQL_SERVER_PASSWORD_TEST }}" | |
failOnStdErr: false | |
deploy-azure-resources-prod: | |
runs-on: ubuntu-latest | |
name: Deploy Azure resources Prod | |
needs: deploy-azure-resources-test | |
environment: Production | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Log into Azure | |
uses: azure/login@v2 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Deploy Azure resources prod | |
uses: azure/arm-deploy@v2 | |
with: | |
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }} | |
resourceGroupName: ${{ secrets.AZURE_RG }} | |
template: infra/main-prod.bicep | |
parameters: "sqlServerPassword=${{ secrets.SQL_SERVER_PASSWORD }}" | |
failOnStdErr: false |