Skip to content

Create Azure Resource Group #2

Create Azure Resource Group

Create Azure Resource Group #2

name: Create Azure Resource Group
on:
workflow_dispatch:
inputs:
resource_group_name:
description: 'The name of the resource group to create'
required: true
default: 'MyResourceGroup'
location:
description: 'The Azure location for the resource group'
required: true
default: 'eastus'
jobs:
create-resource-group:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Create Resource Group
run: |
az group create \
--name ${{ github.event.inputs.resource_group_name }} \
--location ${{ github.event.inputs.location }}