Skip to content

Commit

Permalink
automation flow for one click deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashant-Microsoft committed Sep 6, 2024
1 parent 7268e9e commit 93b9f4e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/az-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy Azure Resources

on:
push:
branches:
- PSL-Automation-7724

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Azure CLI
run: |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az --version # Verify installation
- name: Login to Azure
run: |
az login --service-principal -u ${{ secrets.AUTO_AZURE_CLIENT_ID }} -p ${{ secrets.AUTO_AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AUTO_AZURE_TENANT_ID }}
az account set --subscription ${{ secrets.AUTO_AZURE_SUBSCRIPTION_ID }}
- name: Install Bicep CLI
run: az bicep install

- name: Deploy Bicep Template
id: deploy
run: |
set -e
az deployment sub create \
--name autoDemo \
--location eastus \
--template-file infra/main.bicep \
--parameters environmentName=pslautomation2 location=eastus2

0 comments on commit 93b9f4e

Please sign in to comment.