Skip to content

Commit

Permalink
container test command
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwi committed May 1, 2024
1 parent 2784510 commit a5132cb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/actions/docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ runs:
build-args: ${{ env.BUILD_ARGS }}
secrets: ${{ env.DOCKER_SECRETS }}

- shell: bash
run: |
echo ${{ inputs.CONTAINER_TEST_COMMAND }}
- name: Test
if: github.event_name == 'pull_request' && inputs.CONTAINER_TEST == 'true' && inputs.TAG_ONLY == 'false'
id: test
Expand All @@ -147,7 +151,10 @@ runs:
echo "Starting container for image: ${{ steps.meta.outputs.tags }}"
docker run -d --rm --name test ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
sleep 20
${{ inputs.CONTAINER_TEST_COMMAND }}
docker logs test
curl --fail --silent --location 'http://localhost:3000/healthcheck'
# ${{ inputs.CONTAINER_TEST_COMMAND }}
# docker logs test
# test > logs.txt
# EXECUTIONLOG=$(cat logs.txt)
Expand Down

0 comments on commit a5132cb

Please sign in to comment.