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.
This commit is contained in:
Justin Kromlinger 2023-11-18 17:05:10 +01:00
parent 7dd6177315
commit aaffed1742
No known key found for this signature in database
GPG Key ID: 69EF6D9E49A64EB8

View File

@ -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