Skip to content

Commit b7d8ed6

Browse files
committed
Use published endpoint for Central Portal credential validation
1 parent 3890459 commit b7d8ed6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/credential-validation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ jobs:
4141
TOKEN=$(echo -n "${{ secrets.CENTRAL_USERNAME }}:${{ secrets.CENTRAL_PASSWORD }}" | base64)
4242
HTTP_CODE=$(curl -s -o /dev/null -w '%{http_code}' \
4343
-H "Authorization: UserToken $TOKEN" \
44-
"https://central.sonatype.com/api/v1/publisher/status?id=validation-check")
44+
"https://central.sonatype.com/api/v1/publisher/published?namespace=org.jfrog.buildinfo&name=artifactory-maven-plugin&version=3.7.1")
4545
4646
echo "Maven Central API response: $HTTP_CODE"
4747
48-
# 404 = auth OK but deployment id not found (expected for a test id)
49-
# 200 = auth OK
48+
# 200 = auth OK and artifact found
49+
# 404 = auth OK but artifact not found
5050
# 401 = invalid credentials
5151
if [ "$HTTP_CODE" = "200" ] || [ "$HTTP_CODE" = "404" ]; then
5252
echo "status=SUCCESS" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)