diff --git a/make-yaml-redirector/action.yml b/make-yaml-redirector/action.yml index 19a6b8c..3114663 100644 --- a/make-yaml-redirector/action.yml +++ b/make-yaml-redirector/action.yml @@ -71,10 +71,10 @@ runs: SERVERS=(${{ inputs.failoverserver }}) #fi - for server in "${SERVERS[@]}"; do + for server_id in "${SERVERS[@]}"; do unset REGION LATITUDE LONGITUDE COMMAND=$(curl -sH "Authorization: Token ${{ inputs.netbox }}" -H "Accept: application/json; indent=4" \ - "https://stuff.armbian.com/netbox/api/virtualization/virtual-machines/?limit=500&name__empty=false&name=$server" | jq) + "https://stuff.armbian.com/netbox/api/virtualization/virtual-machines/?limit=500&name__empty=false&id=$server_id" | jq) # where paths has been altered by mirror DL_PATH_DEBS=$(echo $COMMAND | jq '.results[] | .custom_fields["download_path_debs"]' | sed "s/\"//g") DL_PATH_IMAGES=$(echo $COMMAND | jq '.results[] | .custom_fields["download_path_images"]' | sed "s/\"//g")