HH-686: associate OCI package with repository #2
@@ -34,10 +34,10 @@ jobs:
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
run: |
|
||||
package_api=https://git.ipao.vip/api/v1/packages/rogee/container/fingerprint-chromium
|
||||
linked_repo="$(curl --fail --silent --show-error "$package_api/-/latest" | jq -r '.repository.full_name // empty')"
|
||||
linked_repo="$(curl --fail --silent --show-error --header "Authorization: token $REGISTRY_TOKEN" "$package_api/-/latest" | jq -r '.repository.full_name // empty')"
|
||||
if [ "$linked_repo" != rogee/fingerprint-chromium ]; then
|
||||
curl --fail --silent --show-error --request POST \
|
||||
--header "Authorization: token $REGISTRY_TOKEN" \
|
||||
"$package_api/-/link/fingerprint-chromium"
|
||||
fi
|
||||
test "$(curl --fail --silent --show-error "$package_api/-/latest" | jq -r '.repository.full_name // empty')" = rogee/fingerprint-chromium
|
||||
test "$(curl --fail --silent --show-error --header "Authorization: token $REGISTRY_TOKEN" "$package_api/-/latest" | jq -r '.repository.full_name // empty')" = rogee/fingerprint-chromium
|
||||
|
||||
@@ -17,3 +17,4 @@ grep -q 'org.opencontainers.image.source="$OCI_SOURCE"' Dockerfile
|
||||
grep -q 'OCI_SOURCE: https://git.ipao.vip/rogee/fingerprint-chromium' .gitea/workflows/publish.yml
|
||||
grep -q '/link/fingerprint-chromium' .gitea/workflows/publish.yml
|
||||
grep -q "repository.full_name // empty" .gitea/workflows/publish.yml
|
||||
test "$(grep -c 'Authorization: token \$REGISTRY_TOKEN' .gitea/workflows/publish.yml)" -eq 3
|
||||
|
||||
Reference in New Issue
Block a user