Skip to content

Commit

Permalink
ci: Fix docker test image
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospereira committed Nov 28, 2023
1 parent f64300e commit 0e060c9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,16 @@ jobs:
image: ${{ steps.dockerImageName.outputs.dockerImageName }}
write-comment: false
summary: true
# As documented here: https://docs.docker.com/build/ci/github-actions/test-before-push/
# Adapted from https://docs.docker.com/build/ci/github-actions/test-before-push/
- name: Docker / Test Image
run: docker run --rm ${{ steps.dockerImageName.outputs.dockerImageName }}
# From `docker run --help`:
# -d, --detach Run container in background and print container ID
# --rm Automatically remove the container when it exits
# -p, --publish list Publish a container's port(s) to the host
run: |
containerId=$(docker run -d --rm --publish 8080:8080 ${{ steps.dockerImageName.outputs.dockerImageName }})
docker container logs "$containerId"
curl -I http://localhost:8080/
- name: Docker / Publish to GitHub Registry
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit 0e060c9

Please sign in to comment.