Migrate to flrnnc Docker Hub organization.
This commit is contained in:
@@ -30,5 +30,12 @@ done
|
||||
|
||||
docker build \
|
||||
$build_arguments \
|
||||
--tag seafile-client:$TARGET \
|
||||
--build-arg IMAGE=flowgunso \
|
||||
--tag seafile-client:$TARGET-flowgunso \
|
||||
seafile-client/
|
||||
|
||||
docker build \
|
||||
$build_arguments \
|
||||
--build-arg IMAGE=flrnnc \
|
||||
--tag seafile-client:$TARGET-flrnnc \
|
||||
seafile-client/
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
token=$(curl -s \
|
||||
-X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"username": "'"$DOCKER_HUB_OWNER_USERNAME"'", "password": "'"$DOCKER_HUB_OWNER_TOKEN"'"}' \
|
||||
-d '{"username": "'"$DOCKER_REGISTRY_USERNAME"'", "password": "'"$DOCKER_REGISTRY_TOKEN"'"}' \
|
||||
https://hub.docker.com/v2/users/login/ | jq -r .token)
|
||||
|
||||
# Generate a JSON with the README.md as the full_description.
|
||||
json=$(jq -n \
|
||||
--arg readme "$(<documentations/docker.md)" \
|
||||
'{"full_description": $readme,"description":"Synchronize a Seafile library. Support password protected librairies and 2FA authentication."}')
|
||||
'{"full_description": $readme,"description":"Synchronize one or more Seafile library. Support password protected librairies and 2FA authentication."}')
|
||||
|
||||
# Update the Docker Hub repository's full_description.
|
||||
curl -siL \
|
||||
@@ -16,4 +16,11 @@ curl -siL \
|
||||
-d "$json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: JWT $token" \
|
||||
"https://hub.docker.com/v2/repositories/$DOCKER_HUB_IMAGE/"
|
||||
"https://hub.docker.com/v2/repositories/$DOCKER_HUB_IMAGE_FLOWGUNSO/"
|
||||
|
||||
curl -siL \
|
||||
-X PATCH \
|
||||
-d "$json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: JWT $token" \
|
||||
"https://hub.docker.com/v2/repositories/$DOCKER_HUB_IMAGE_FLRNNC/"
|
||||
@@ -49,8 +49,13 @@ for version_component in $(echo $version | tr '.' '\n'); do
|
||||
done
|
||||
|
||||
# Tag then push to the Docker Hub registry.
|
||||
echo $DOCKER_HUB_BOT_TOKEN | docker login --password-stdin --username $DOCKER_HUB_BOT_USERNAME
|
||||
echo $DOCKER_REGISTRY_TOKEN | docker login --password-stdin --username $DOCKER_REGISTRY_USERNAME
|
||||
for tag in "${tags[@]}"; do
|
||||
docker tag seafile-client:$TARGET $DOCKER_HUB_IMAGE:$tag
|
||||
docker push $DOCKER_HUB_IMAGE:$tag
|
||||
docker tag seafile-client:$TARGET $DOCKER_REGISTRY_IMAGE_FLOWGUNSO:$tag
|
||||
docker push $DOCKER_REGISTRY_IMAGE_FLOWGUNSO:$tag
|
||||
done
|
||||
|
||||
for tag in "${tags[@]}"; do
|
||||
docker tag seafile-client:$TARGET-flrnnc $DOCKER_REGISTRY_IMAGE_FLRNNC:$tag
|
||||
docker push $DOCKER_REGISTRY_IMAGE_FLRNNC:$tag
|
||||
done
|
||||
Reference in New Issue
Block a user