Skip to content

Commit 101ec21

Browse files
committed
ttt
1 parent 1d85e1b commit 101ec21

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/testing-vars.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,30 @@ jobs:
5454
username: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_USERNAME }}
5555
password: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}
5656

57+
58+
- name: Test dockerhub overview update
59+
run: |
60+
JSON_PAYLOAD=$(jq -n --rawfile content README.md '{ "full_description": $content }')
61+
AUTH_RESPONSE=$(curl -s -X POST \
62+
-H "Content-Type: application/json" \
63+
-d '{
64+
"identifier": "'"${{ secrets.ORG_DOCKERHUB_ERIGONTECH_USERNAME }}"'",
65+
"secret": "'"${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}"'"
66+
}' \
67+
https://hub.docker.com/v2/auth/token/)
68+
69+
# Extract the JWT (The token is stored in the 'token' field of the JSON response)
70+
DOCKER_JWT=$(echo "${AUTH_RESPONSE}" | jq -r .access_token)
71+
72+
API_URL="https://hub.docker.com/v2/repositories/erigontech/dev-erigon/"
73+
RESULT=$(curl -s -X PATCH \
74+
-H "Authorization: Bearer ${DOCKER_JWT}" \
75+
-H "Content-Type: application/json" \
76+
-d "${JSON_PAYLOAD}" \
77+
"${API_URL}")
78+
79+
echo "Results:\n$(echo $RESULT | jq .)"
80+
5781
- name: Debug output
5882
env:
5983
LOCAL_DEBUG1: ${{ github.ref_name == 'main' && format('{0}{1}{2}', 'Input variable skip_tests ', ' set to value ', inputs.skip_tests) || inputs.skip_tests }}

0 commit comments

Comments
 (0)