Skip to content

Commit

Permalink
create group
Browse files Browse the repository at this point in the history
  • Loading branch information
v-weiyding committed Sep 5, 2024
1 parent 542046e commit a6db2bc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/appconfig-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,21 @@ jobs:
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}


- name: Create resource group
- name: Prepare resource name
shell: bash
run: |
rg="rg-$(uuidgen | cut -c 1-8)"
echo "resource_group=$rg" >> $GITHUB_ENV
az group create --name ${{ env.resource_group }} --location ${{ github.event.inputs.location }}
- name: Prepare resource name
shell: bash
run: |
rn="appconfig-$(uuidgen | cut -c 1-8)"
echo "resource_name=$rn" >> $GITHUB_ENV
- name: Create resource
shell: bash
run: |
az group create --name ${{ env.resource_group }} --location ${{ github.event.inputs.location }}
az appconfig create -g ${{ env.resource_group }} -n ${{ env.resource_name }} -l westus
connString=$(az appconfig credential list --name ${{ env.resource_name }} --resource-group ${{ env.resource_group }} --query "[?name=='Primary'].connectionString" -o tsv)
echo "connString=$connString" >> $GITHUB_ENV
Expand Down

0 comments on commit a6db2bc

Please sign in to comment.