forked from projectmoon/tenebrous-dicebot
No point in building docker image only to build it again.
This commit is contained in:
parent
4ff8e95640
commit
b90f1fe92a
|
@ -29,26 +29,11 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --verbose
|
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.
|
# Push image to GitHub Packages.
|
||||||
# See also https://docs.docker.com/docker-hub/builds/
|
# See also https://docs.docker.com/docker-hub/builds/
|
||||||
docker_push:
|
docker_push:
|
||||||
# Ensure test job passes before pushing image.
|
# Ensure test job passes before pushing image.
|
||||||
needs: [ build_and_test, docker_test ]
|
needs: build_and_test
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
|
|
Loading…
Reference in New Issue