Update push_readme.yml

This commit is contained in:
Damien Duboeuf
2023-08-08 11:59:14 +02:00
committed by GitHub
parent 4bc3bee463
commit bdac0c1f2a
+2 -1
View File
@@ -28,4 +28,5 @@ jobs:
run: |
DOCKERHUB_REPO_NAME=${GITHUB_REPOSITORY#*/}
TOKEN=$(curl -s -X POST -H "Content-Type: application/json" -d '{"username": "${{ secrets.DOCKER_USERNAME }}", "password": "${{ secrets.DOCKER_PASSWORD }}"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
curl -s -X PATCH -H "Authorization: JWT $TOKEN" -H "Content-Type: application/json" -d "{\"full_description\": \"$(<Readme.md)\"}" https://hub.docker.com/v2/repositories/${{ secrets.DOCKER_USERNAME }}/$DOCKERHUB_REPO_NAME/
DESC=$(< Readme.md | jq -sR .)
curl -s -X PATCH -H "Authorization: JWT $TOKEN" -H "Content-Type: application/json" -d "{\"full_description\": $DESC}" https://hub.docker.com/v2/repositories/${{ secrets.DOCKER_USERNAME }}/$DOCKERHUB_REPO_NAME/