Skip to content

Commit 1976a0d

Browse files
fix: streamline resource group creation by consolidating tag handling
1 parent 99bd63e commit 1976a0d

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

.github/workflows/job-deploy.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,7 @@ jobs:
388388
rg_exists=$(az group exists --name $RESOURCE_GROUP_NAME)
389389
if [ "$rg_exists" = "false" ]; then
390390
echo "📦 Resource group does not exist. Creating new resource group '$RESOURCE_GROUP_NAME' in location '$AZURE_LOCATION'..."
391-
TAG_ARGS=""
392-
if [ -n "${{ env.RG_TAGS }}" ]; then
393-
TAG_ARGS="--tags ${{ env.RG_TAGS }}"
394-
fi
395-
az group create --name $RESOURCE_GROUP_NAME --location $AZURE_LOCATION $TAG_ARGS || { echo "❌ Error creating resource group"; exit 1; }
391+
az group create --name $RESOURCE_GROUP_NAME --location $AZURE_LOCATION --tags ${{ env.RG_TAGS }} || { echo "❌ Error creating resource group"; exit 1; }
396392
echo "✅ Resource group '$RESOURCE_GROUP_NAME' created successfully."
397393
else
398394
echo "✅ Resource group '$RESOURCE_GROUP_NAME' already exists. Deploying to existing resource group."

0 commit comments

Comments
 (0)