No point in building docker image only to build it again.

This commit is contained in:
projectmoon 2020-08-31 20:57:47 +00:00
parent 4ff8e95640
commit b90f1fe92a
1 changed files with 1 additions and 16 deletions

View File

@ -29,26 +29,11 @@ jobs:
- name: Run tests
run: cargo test --verbose
docker_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
docker build . --file Dockerfile
fi
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
docker_push:
# Ensure test job passes before pushing image.
needs: [ build_and_test, docker_test ]
needs: build_and_test
runs-on: ubuntu-latest
if: github.event_name == 'push'