Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
.github/workflows/docker.yml: Show Docker images as annotations, show…
… instructions
  • Loading branch information
Matthias Koeppe committed Feb 14, 2024
commit b4e6ac7cf9cf5ec5ff8bc7a174335eb084b045f4
29 changes: 26 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,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()