Update create-discord-thread.yml

This commit is contained in:
Bas van den Berg 2025-03-17 12:22:10 +01:00 committed by GitHub
parent 4cc5a69986
commit e00542a62f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,7 +55,7 @@ jobs:
JSON=$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/json/${{ env.TITLE }}.json) JSON=$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/json/${{ env.TITLE }}.json)
username=$(echo "$JSON" | jq -r '.default_credentials.username') username=$(echo "$JSON" | jq -r '.default_credentials.username')
password=$(echo "$JSON" | jq -r '.default_credentials.password') password=$(echo "$JSON" | jq -r '.default_credentials.password')
notes=($(echo "$JSON" | jq -r '.notes[].text')) mapfile -t notes_array < <(echo "$JSON" | jq -r '.notes[].text')
if [[ -n "$username" && "$username" != "null" || -n "$password" && "$password" != "null" ]]; then if [[ -n "$username" && "$username" != "null" || -n "$password" && "$password" != "null" ]]; then
VAR+="Default credentials:\n" VAR+="Default credentials:\n"
@ -70,14 +70,12 @@ jobs:
VAR+="\n" VAR+="\n"
fi fi
if [ ${#notes[@]} -gt 0 ]; then if [ ${#notes_array[@]} -gt 0 ]; then
VAR+="Notes:\n" for note in "${notes_array[@]}"; do
for note in "${notes[@]}"; do VAR+="$note\n"
VAR+="$note"
done done
VAR+="\n" VAR+="\n"
fi fi
fi fi
VAR+="Note: This is not in the official repo yet—it's just a dev version! After merging into ProxmoxVE, it will need to be recreated.\n\n" VAR+="Note: This is not in the official repo yet—it's just a dev version! After merging into ProxmoxVE, it will need to be recreated.\n\n"
VAR+="Discussion & issue tracking:\n" VAR+="Discussion & issue tracking:\n"