Skip to content

Commit a19a348

Browse files
author
Matthias Koeppe
committed
.github/workflows/docker.yml: Improve wording of Docker instructions
1 parent eba5a06 commit a19a348

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/docker.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,19 +263,24 @@ jobs:
263263
- name: List Docker images
264264
run: |
265265
if [ -n "$DOCKER_PUSH_REPOSITORY" -a -f .tox/$TOX_ENV/Dockertags ]; then
266-
echo "::notice title=Docker images pushed::$(echo $(cat .tox/$TOX_ENV/Dockertags))"
266+
set -- $(cat .tox/$TOX_ENV/Dockertags)
267+
case $# in
268+
1) images="image"; one_image="the image";;
269+
*) images="images"; one_image="one of the images";;
270+
esac
271+
echo "::notice title=Docker $images pushed::Pushed $images $(echo $(cat .tox/$TOX_ENV/Dockertags))"
267272
echo
268-
echo "To pull an image and enter the container, type:"
273+
echo "To pull $one_image and enter the container, type:"
269274
echo
270-
for TAG in $(cat .tox/$TOX_ENV/Dockertags); do
275+
for TAG in $*; do
271276
echo " \$ docker run -it $TAG bash"
272277
done
273278
echo
274-
echo "To use an image as the base for an incremental build, type:"
279+
echo "To use $one_image as the base for an incremental build, type:"
275280
echo
276281
TOX_ENV_SANS_INCREMENTAL=${TOX_ENV/-incremental/}
277282
DOCKER_IMAGE=${TOX_ENV_SANS_INCREMENTAL#docker-}
278-
for TAG in $(cat .tox/$TOX_ENV/Dockertags); do
283+
for TAG in $*; do
279284
echo -n " \$"
280285
if [ "$DOCKER_PUSH_REPOSITORY" != "ghcr.io/sagemath/sage/" ]; then
281286
echo -n " FROM_DOCKER_REPOSITORY=$DOCKER_PUSH_REPOSITORY"

0 commit comments

Comments
 (0)