constellation/.github/actions/pick_azure_region/action.yml
2023-10-20 13:38:08 +02:00

25 lines
575 B
YAML

name: Pick an Azure region
description: "Pick an Azure region"
outputs:
region:
description: "One of the supported Azure regions"
value: ${{ steps.pick-region.outputs.region }}
runs:
using: "composite"
steps:
- name: Pick a region
id: pick-region
shell: bash
run: |
possibleRegions=(
"westus"
"eastus"
"northeurope"
"westeurope"
"southeastasia"
)
region=${possibleRegions[$RANDOM % ${#possibleRegions[@]}]}
echo "region=$region" | tee -a "$GITHUB_OUTPUT"