Skip to content

Commit

Permalink
Refactor azure-deploy-image-test.yml: Remove unused code and update r…
Browse files Browse the repository at this point in the history
…esource group creation
  • Loading branch information
crlsocro committed Sep 19, 2024
1 parent 2d28dfa commit ca49379
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 48 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/deploy-azure-resources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
push:
branches:
# - main
- 'feature/**'
paths:
- 'infra/**'
name: Deploy to Azure Resource Group
jobs:
build-and-deploy:
runs-on: ubuntu-latest
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.bicep
failOnStdErr: false

# - name: Resource Group Test
# run: |
# az deployment sub create \
# --location norwayeast \
# --template-file infra/modules/resourceGroup.bicep \
# --parameters resourceGroupName='rg-bds-test' resourceGroupLocation='norwayeast' \
# --subscription ${{ secrets.AZURE_SUBSCRIPTION }}

# - name: Deploy Azure Container Registry
# uses: azure/arm-deploy@v2
# with:
# subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }}
# resourceGroupName: ${{ secrets.AZURE_RG }}
# template: infra/modules/containerRegistry.bicep
# failOnStdErr: false

# - name: Deploy Azure Storage Account
# uses: azure/arm-deploy@v1
# with:
# subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }}
# resourceGroupName: ${{ secrets.AZURE_RG }}
# template: infra/modules/storageAccount.bicep
# failOnStdErr: false


46 changes: 0 additions & 46 deletions .github/workflows/deployBicepFile.yml

This file was deleted.

13 changes: 13 additions & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@description('The name of the Azure Container Registry.')
param acrName string

@description('The location for the registry.')
param location string = 'norwayeast'

module containerRegistry 'modules/containerRegistry.bicep' = {
name: acrName
params: {
acrName: acrName
location: location
}
}
4 changes: 2 additions & 2 deletions infra/modules/containerRegistry.bicep
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

@description('The name of the Azure Container Registry.')
param acrName string = 'bouvetDevSurveyContainerRegistry'
param acrName string

@description('The location for the registry.')
param location string = 'norwayeast'
param location string

@description('The tier of your Azure Container Registry.')
param acrSku string = 'Basic'
Expand Down
Empty file added infra/modules/keyVault.bicep
Empty file.
Empty file added infra/modules/openAi.bicep
Empty file.
Empty file added infra/modules/sqlDatabase.bicep
Empty file.
Empty file added infra/modules/sqlServer.bicep
Empty file.

0 comments on commit ca49379

Please sign in to comment.