Skip to content

Commit

Permalink
Fix push-images script
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Yacob <[email protected]>
  • Loading branch information
MarcosDY committed Dec 14, 2022
1 parent f4c2369 commit 9fb8994
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/scripts/push-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ if [ -n "${variant}" ] && [ "${variant}" != "-scratch" ]; then
fi

OCI_IMAGES=(
spire-server spire-agent k8s-workload-registrar oidc-discovery-provider
spire-server spire-agent oidc-discovery-provider
)

registry=gcr.io/spiffe-io
if [ "${variant}" = "-scratch" ] ; then
org_name=$(echo "$GITHUB_REPOSITORY" | tr '/' "\n" | head -1 | tr -d "\n")
org_name="${org_name:-spiffe}" # default to spiffe in case ran on local
registry=ghcr.io/${org_name}

# don't publish k8s-workload-registrar for scratch images
OCI_IMAGES=("${OCI_IMAGES[@]/k8s-workload-registrar}")
else
# Continue publishing the non-scratch k8s-workload-registrar to GCR
OCI_IMAGES+=( k8s-workload-registrar )
fi

echo "Pushing images ${OCI_IMAGES[*]} to ${registry} with tag ${version}".
Expand Down

0 comments on commit 9fb8994

Please sign in to comment.