From aaffed1742c961d6f10fa73abb4206c544fa3073 Mon Sep 17 00:00:00 2001 From: Justin Kromlinger Date: Sat, 18 Nov 2023 17:05:10 +0100 Subject: [PATCH] Move "inofficial" DockerHub description update out of "official" `publish-dockerhub` job See https://gitlab.archlinux.org/archlinux/archlinux-docker/-/merge_requests/86#note_133349 Also adds a link where the description of the "offical" DockerHub description is maintained. --- .gitlab-ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2394bf1..a82093c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -222,9 +222,13 @@ pre-release: - $PUBLISH_ARCHLINUX_REPOSITORY == "TRUE" before_script: - apk update - - apk add jq curl bash + - apk add jq curl httpie bash script: - | + echo "Update the description of our daily DockerHub repository at https://hub.docker.com/r/archlinux/archlinux" + TOKEN="$(http --ignore-stdin POST https://hub.docker.com/v2/users/login username="${DOCKERHUB_USERNAME}" password="${DOCKERHUB_PASSWORD}" | jq -er .token)" + http --ignore-stdin PATCH https://hub.docker.com/v2/repositories/archlinux/archlinux/ Authorization:"JWT ${TOKEN}" full_description="$(cat README.md)" + # Upload rootfs to the Generic Packages Repository for group in base base-devel multilib-devel; do rootfs_file="${group}-${BUILD_VERSION}.tar.zst" @@ -305,6 +309,7 @@ release: url: '${PACKAGE_REGISTRY_URL}/multilib-devel-${BUILD_VERSION}.tar.zst.SHA256' # Publish to the official Docker namespace: https://hub.docker.com/_/archlinux +# Note: The description is maintained here: https://github.com/docker-library/docs/tree/master/archlinux publish-dockerhub: stage: publish dependencies: @@ -321,13 +326,10 @@ publish-dockerhub: - test -n "$BUILD_VERSION" - test -n "$BUILD_COMMIT" - test -n "$GITHUB_TOKEN" - - pacman -Syu --noconfirm jq httpie github-cli git gettext + - pacman -Syu --noconfirm github-cli git gettext - git config --global user.email "github@archlinux.org" - git config --global user.name "Arch Linux Technical User" script: - - echo "Update the description on https://hub.docker.com/r/archlinux/archlinux" - - TOKEN="$(http --ignore-stdin POST https://hub.docker.com/v2/users/login username="${DOCKERHUB_USERNAME}" password="${DOCKERHUB_PASSWORD}" | jq -er .token)" - - http --ignore-stdin PATCH https://hub.docker.com/v2/repositories/archlinux/archlinux/ Authorization:"JWT ${TOKEN}" full_description="$(cat README.md)" - echo "Update the Docker library Github repo" - mkdir official-images - cd official-images