constellation/.github/actions/pick_azure_region/action.yml

25 lines
575 B
YAML
Raw Normal View History

2023-10-20 07:38:08 -04:00
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"