Skip to content

Commit

Permalink
.github/workflows/docker.yml: Show Docker images as annotations, show…
Browse files Browse the repository at this point in the history
… instructions
  • Loading branch information
mkoeppe committed Dec 26, 2023
1 parent a1719e1 commit 950f571
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,32 @@ jobs:
run: |
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
if: always()
- name: List docker images
- name: List Docker images
run: |
if [ -f .tox/$TOX_ENV/Dockertags ]; then
cat .tox/$TOX_ENV/Dockertags
if [ -n "$DOCKER_PUSH_REPOSITORY" -a -f .tox/$TOX_ENV/Dockertags ]; then
echo "::notice title=Docker images pushed::$(echo $(cat .tox/$TOX_ENV/Dockertags))"
echo
echo "To pull an image and enter the container, type:"
echo
for TAG in $(cat .tox/$TOX_ENV/Dockertags); do
echo " \$ docker run -it $TAG bash"
done
echo
echo "To use an image as the base for an incremental build, type:"
echo
TOX_ENV_SANS_INCREMENTAL=${TOX_ENV/-incremental/}
DOCKER_IMAGE=${TOX_ENV_SANS_INCREMENTAL#docker-}
for TAG in $(cat .tox/$TOX_ENV/Dockertags); do
echo -n " \$"
if [ "$DOCKER_PUSH_REPOSITORY" != "ghcr.io/sagemath/sage/" ]; then
echo -n " FROM_DOCKER_REPOSITORY=$DOCKER_PUSH_REPOSITORY"
fi
eval DOCKER_TARGET=\${TAG#*$DOCKER_IMAGE-}
DOCKER_TARGET=${DOCKER_TARGET%:*}
if [ "$DOCKER_TARGET" != "with-targets" ]; then
echo -n " FROM_DOCKER_TARGET=$DOCKER_TARGET"
fi
echo " FROM_DOCKER_TAG=${TAG#*:} tox -e $TOX_ENV_SANS_INCREMENTAL-incremental"
done
fi
if: always()

0 comments on commit 950f571

Please sign in to comment.