Skip to content

Commit

Permalink
Detach test containers from STDIN
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKobayashi committed Sep 28, 2024
1 parent bd32f08 commit 0178680
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,14 @@ jobs:
- name: Test image
run: |
set -x
timeout --kill-after=30s --preserve-status 30s \
docker container run --attach stdout --attach stderr --rm ${{ needs.build-setup.outputs.repo-owner }}/${{ matrix.container }}:test
apt-get install uuid-runtime
CONTAINER_ID="$(uuidgen)"
docker container run --attach stdout --attach stderr --init --name=$CONTAINER_ID --rm ${{ needs.build-setup.outputs.repo-owner }}/${{ matrix.container }}:test &
sleep 60
docker container stop $CONTAINER_ID
# Remove the test image
- name: Remove test image
if: ${{ !cancelled() }}
run: |
set -x
docker image rm ${{ needs.build-setup.outputs.repo-owner }}/${{ matrix.container }}:test
docker image rm --force ${{ needs.build-setup.outputs.repo-owner }}/${{ matrix.container }}:test

0 comments on commit 0178680

Please sign in to comment.