Skip to content

Commit e594cc7

Browse files
Change docker-build job to run on ubuntu-latest and update resource group name generation to use PowerShell
1 parent e60f2f9 commit e594cc7

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

.github/workflows/deploy-v2-windows.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ env:
9090
jobs:
9191
docker-build:
9292
if: github.event_name == 'workflow_dispatch' && github.event.inputs.build_docker_image == 'true'
93-
runs-on: windows-latest
93+
runs-on: ubuntu-latest
9494
outputs:
9595
IMAGE_TAG: ${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
9696
steps:
@@ -344,20 +344,20 @@ jobs:
344344
345345
- name: Generate Resource Group Name
346346
id: generate_rg_name
347-
shell: bash
347+
shell: powershell
348348
run: |
349349
# Check if a resource group name was provided as input
350-
if [[ -n "${{ github.event.inputs.resource_group_name }}" ]]; then
351-
echo "Using provided Resource Group name: ${{ github.event.inputs.resource_group_name }}"
352-
echo "RESOURCE_GROUP_NAME=${{ github.event.inputs.resource_group_name }}" >> $GITHUB_ENV
353-
else
354-
echo "Generating a unique resource group name..."
355-
ACCL_NAME="cp" # Account name as specified
356-
SHORT_UUID=$(uuidgen | cut -d'-' -f1)
357-
UNIQUE_RG_NAME="arg-${ACCL_NAME}-${SHORT_UUID}"
358-
echo "RESOURCE_GROUP_NAME=${UNIQUE_RG_NAME}" >> $GITHUB_ENV
359-
echo "Generated RESOURCE_GROUP_NAME: ${UNIQUE_RG_NAME}"
360-
fi
350+
if ("${{ github.event.inputs.resource_group_name }}" -ne "") {
351+
Write-Host "Using provided Resource Group name: ${{ github.event.inputs.resource_group_name }}"
352+
"RESOURCE_GROUP_NAME=${{ github.event.inputs.resource_group_name }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
353+
} else {
354+
Write-Host "Generating a unique resource group name..."
355+
$ACCL_NAME = "cp" # Account name as specified
356+
$SHORT_UUID = ([guid]::NewGuid().ToString().Split('-')[0])
357+
$UNIQUE_RG_NAME = "arg-${ACCL_NAME}-${SHORT_UUID}"
358+
"RESOURCE_GROUP_NAME=${UNIQUE_RG_NAME}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
359+
Write-Host "Generated RESOURCE_GROUP_NAME: ${UNIQUE_RG_NAME}"
360+
}
361361
362362
- name: Setup Azure Developer CLI
363363
shell: bash

0 commit comments

Comments
 (0)