Skip to content

Commit

Permalink
Merge pull request whoan#59 from gabe565/gcr-namespace-jq
Browse files Browse the repository at this point in the history
Determine the GCR namespace with jq instead of sed
  • Loading branch information
whoan authored Aug 5, 2020
2 parents 314daaf + 1a6822c commit 3d38f09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ _set_namespace() {
NAMESPACE=$GITHUB_REPOSITORY
elif _is_gcloud_registry; then
# take project_id from Json Key
NAMESPACE=$(echo "${INPUT_PASSWORD}" | sed -rn 's@.+project_id" *: *"([^"]+).+@\1@p' 2> /dev/null)
NAMESPACE=$(jq -r '.project_id' <<< "$INPUT_PASSWORD" 2> /dev/null)
[ "$NAMESPACE" ] || return 1
fi
# aws-ecr does not need a namespace
Expand Down

0 comments on commit 3d38f09

Please sign in to comment.