From c8cfb250081eece9c799afe9b14a3d106288d7c0 Mon Sep 17 00:00:00 2001 From: Markus Rudy Date: Thu, 14 Mar 2024 10:50:21 +0100 Subject: [PATCH] ci: query identity directly instead of searching in list --- .github/actions/cdbg_deploy/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/cdbg_deploy/action.yml b/.github/actions/cdbg_deploy/action.yml index 0144b460d..7917fcde1 100644 --- a/.github/actions/cdbg_deploy/action.yml +++ b/.github/actions/cdbg_deploy/action.yml @@ -40,10 +40,10 @@ runs: if: inputs.cloudProvider == 'azure' shell: bash run: | - UAMI=$(yq eval ".provider.azure.userAssignedIdentity | upcase" constellation-conf.yaml) - PRINCIPAL_ID=$(az identity list | yq ".[] | select(.id | test(\"(?i)$UAMI\"; \"g\")) | .principalId") + UAMI=$(yq eval ".provider.azure.userAssignedIdentity" constellation-conf.yaml) + PRINCIPAL_ID=$(az identity show --ids "$UAMI" | yq ".principalId") if [ -z "$PRINCIPAL_ID" ]; then - echo "::error::PRINCIPAL_ID for $UAMI not found" + echo "::error::PRINCIPAL_ID for \"$UAMI\" not found" echo "::group::Available identities" az identity list | yq ".[].id" echo "::endgroup::"