HH-686: associate OCI package with repository #2

Merged
rogee merged 3 commits from agent/hh-686-gitea-package-association into main 2026-08-26 18:55:32 +08:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit b0549d13a1 - Show all commits
+2 -2
View File
@@ -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
+1
View File
@@ -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