Handle secret generation in multiple compose files?
continuous-integration/drone/push Build is passing Details

This commit is contained in:
3wc 2023-01-20 23:34:12 -08:00
parent 768c48ddf9
commit 69df540680
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,8 @@ generate_secrets() {
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY} -O /usr/bin/yq &&\
chmod +x /usr/bin/yq
for SECRET in $(yq r "$PLUGIN_COMPOSE" 'secrets.*.name'); do
# shellcheck disable=SC2086
for SECRET in $(yq r ${PLUGIN_COMPOSE//:/ } 'secrets.*.name'); do
SECRET=$(eval echo "$SECRET")
if docker -H "$REMOTE_DOCKER_HOST" secret ls | grep -q "$SECRET"; then
echo "Skipping existing secret $SECRET"