Skip to content

Commit

Permalink
Use QUAY_API_TOKEN for curl request (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsquizz authored Sep 8, 2021
1 parent 219a71a commit 434a661
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cicd/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# Env vars normally supplied by CI environment:
#QUAY_USER
#QUAY_TOKEN
#QUAY_API_TOKEN
#RH_REGISTRY_USER
#RH_REGISTRY_TOKEN

Expand Down Expand Up @@ -83,7 +84,7 @@ if [[ $IMAGE == quay.io/* ]]; then
echo "checking if image '$IMAGE:$IMAGE_TAG' already exists in quay.io..."
QUAY_REPO=${IMAGE#"quay.io/"}
RESPONSE=$( \
curl -Ls -I -o /dev/null -w "%{http_code}" -H "Authorization: Bearer $QUAY_TOKEN" \
curl -Ls -I -o /dev/null -w "%{http_code}" -H "Authorization: Bearer $QUAY_API_TOKEN" \
https://quay.io/api/v1/repository/$QUAY_REPO/tag/$IMAGE_TAG/images \
)
echo "received HTTP response: $RESPONSE"
Expand Down

0 comments on commit 434a661

Please sign in to comment.