chore(): Adds logging credentials if existent
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8be346259b
commit
720bb64266
1 changed files with 13 additions and 1 deletions
|
@ -12,6 +12,18 @@ report_digest=$(echo "$image_information" | tail -n1 | awk -F ' ' '{print $2}')
|
|||
#printf "$report_digest\n"
|
||||
printf "Found digests for scan report...\n"
|
||||
|
||||
extra_vars=""
|
||||
|
||||
if [[ -v REGISTRY_USERNAME ]]
|
||||
then
|
||||
extra_vars="$extra_vars --username $REGISTRY_USERNAME"
|
||||
fi
|
||||
|
||||
if [[ -v REGISTRY_PASSWORD ]]
|
||||
then
|
||||
extra_vars="$extra_vars --password $REGISTRY_PASSWORD"
|
||||
fi
|
||||
|
||||
image_base=$(echo "$image" | awk -F ':' '{print $1}')
|
||||
printf "Pulling $image_base:@$report_digest...\n"
|
||||
oras pull "$image_base:@$report_digest"
|
||||
oras pull "$extra_vars" "$image_base:@$report_digest"
|
||||
|
|
Loading…
Reference in a new issue