change run

This commit is contained in:
Johan Rooijakkers 2025-02-26 16:07:01 +01:00
parent 4c47cbb786
commit b1276bb623

View File

@ -57,14 +57,16 @@ runs:
- name: Retrieve Requested Secrets - name: Retrieve Requested Secrets
shell: sh shell: sh
run: | run: |
INPUT_SECRETS=$(echo "${{ inputs.secrets }}" | tr '\n' ',')
OLDIFS="$IFS" OLDIFS="$IFS"
IFS="," IFS=","
set -- "${{ inputs.secrets }}" set -- $INPUT_SECRETS
IFS="$OLDIFS" IFS="$OLDIFS"
for pair in "$@"; do for pair in "$@"; do
SECRET_ID=$(echo "$pair" | cut -d"=" -f1) SECRET_ID=$(echo "$pair" | cut -d'>' -f1 | xargs)
ENV_VAR=$(echo "$pair" | cut -d"=" -f2) ENV_VAR=$(echo "$pair" | cut -d'>' -f2 | xargs)
echo "Retrieving secret: $SECRET_ID..." echo "Retrieving secret: $SECRET_ID..."
SECRET_VALUE=$(bw get notes "$SECRET_ID" --session "$BW_SESSION") SECRET_VALUE=$(bw get notes "$SECRET_ID" --session "$BW_SESSION")
@ -77,3 +79,4 @@ runs:
fi fi
done done