Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

201 configure azure infrastructure #229

Merged
merged 14 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/azure-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
environment: azure-prod
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Login to Azure
uses: azure/login@v2
with:
Expand All @@ -23,14 +23,14 @@ jobs:
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Lint Bicep
run: |
az bicep build ./azure/bicep/main.bicep
az bicep build --file ./azure/bicep/main.bicep
- name: Run what-if
uses: azure/arm-deploy@v1
uses: azure/arm-deploy@v2
with:
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resourceGroupName: ${{ secrets.AZURE_RG }}
template: ./azure/bicep/main.bicep
parameters: 'environment=prod '
# parameters: 'environment=prod '
scope: 'resourcegroup'
failOnStdErr: false
additionalArguments: --what-if
Expand All @@ -40,20 +40,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Deploy Bicep
uses: azure/arm-deploy@v1
uses: azure/arm-deploy@v2
with:
deploymentName: ${{ github.run_number }}
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resourceGroupName: ${{ secrets.AZURE_RG }}
template: ./azure/bicep/main.bicep
parameters: 'environment=prod '
# parameters: 'environment=prod '
scope: 'resourcegroup'
failOnStdErr: false
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions azure/bicep/main.bicep
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
targetScope = 'resourceGroup'

@allowed(['dev', 'prod'])
param environment string = 'dev'
// @allowed(['dev', 'prod'])
// param environment string = 'dev'
param location string = resourceGroup().location
param name string = 'final-hill-cathedral'
// param dockerComposeFile string

// Dummy for testing
resource stg 'Microsoft.Storage/storageAccounts@2023-04-01' = {
name: toLower('stg-${name}-${environment}')
name: toLower('stg-${name}')
location: location
sku: {
name: 'Standard_LRS'
Expand Down
Loading