#!/bin/sh

TOKEN=$(curl -s https://ghcr.io/token?scope=repository:bitfocus/companion/companion:pull | jq -r .token)

curl --head -s --fail -H "Authorization: Bearer $TOKEN" https://ghcr.io/v2/bitfocus/companion/companion/manifests/$1 > /dev/null
exit $?
