Skip to content

Commit

Permalink
Update GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed May 22, 2024
1 parent 27fab4f commit 3c33527
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Build and test Docker image
# This workflow builds a Docker image and runs a container to test the image.
# Five seconds after it starts the container, it prints the logs of the container.
# Then, it checks if the container is running. If the container is not running, the
# workflow exits with an error.

on:
push:
Expand Down Expand Up @@ -37,4 +41,8 @@ jobs:
docker run --name test-container -d ${{ env.IMAGE_NAME }}:latest
sleep 5
docker logs test-container
if [ "$(docker ps -f name=test-container -q)" = "" ]; then
echo "Container is not running."
exit 1
fi
docker stop test-container

0 comments on commit 3c33527

Please sign in to comment.