Skip to content

update: bicep params #27

update: bicep params

update: bicep params #27

Workflow file for this run

name: ie-bank-infra
on:
workflow_dispatch:
push:
paths-ignore:
- 'scripts/**'
env:
RESOURCE_GROUP_DEV: BCSAI2024-DEVOPS-PROFESSORS
RESOURCE_GROUP_UAT: BCSAI2024-DEVOPS-PROFESSORS
SUBSCRIPTION_ID_DEV: e0b9cada-61bc-4b5a-bd7a-52c606726b3b
USER_ALIAS: aguadamillas
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout code
- uses: actions/checkout@main
# Lint Bicep code
- name: Run Bicep linter
run: az bicep build --file ./main.bicep
deploy-dev:
# if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
needs: build
environment:
name: 'Development'
steps:
# Checkout code
- uses: actions/checkout@main
# Log into Azure
- uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
# Deploy Bicep file
- name: deploy
uses: azure/arm-deploy@v2
with:
subscriptionId: ${{ env.SUBSCRIPTION_ID_DEV }}
resourceGroupName: ${{ env.RESOURCE_GROUP_DEV }}
template: ./main.bicep
parameters: ./parameters/dev.bicepparam appServiceAPIEnvVarDBPASS=${{ secrets.DBPASS }} appServiceAPIDBHostDBUSER=${{ secrets.DBUSER }}
deploymentName: ${{ env.USER_ALIAS }}-dev
deploy-uat:
if: (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') || github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [build,deploy-dev]
environment:
name: 'UAT'
steps:
# Checkout code
- uses: actions/checkout@main
# Log into Azure
- uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
# Deploy Bicep file
- name: deploy
uses: azure/arm-deploy@v2
with:
subscriptionId: ${{ env.SUBSCRIPTION_ID_DEV }}
resourceGroupName: ${{ env.RESOURCE_GROUP_DEV }}
template: ./main.bicep
parameters: ./parameters/uat.bicepparam appServiceAPIEnvVarDBPASS=${{ secrets.DBPASS }} appServiceAPIDBHostDBUSER=${{ secrets.DBUSER }}
deploymentName: ${{ env.USER_ALIAS }}-uat