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