Skip to content

testing automation flow #78

testing automation flow

testing automation flow #78

Workflow file for this run

name: Deploy Azure Resources-Updated
on:
push:
branches:
- PSL-Automation-Flow-Draft
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=pslautomation location=eastus2
- name: Create Failure mail
if: ${{ failure() }}
uses: octokit/[email protected]
with:
route: GET /repos/${{ github.repository }}/actions
mediaType: |
{
"title":"Deployment Failed",
"body":"Deployment TEST failed for branch ${{ github.ref }}. Please check the logs. @[email protected]",
"assignees":["[email protected]"]
}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}