ci: docker prune images before and after test
This commit is contained in:
parent
2998b014ce
commit
8f0ef274a8
|
@ -9,6 +9,7 @@ jobs:
|
||||||
runs-on: ${{ matrix.runs-on }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
otp:
|
otp:
|
||||||
- erl23.3.4.9-3
|
- erl23.3.4.9-3
|
||||||
|
@ -29,6 +30,9 @@ jobs:
|
||||||
container: emqx/build-env:${{ matrix.otp }}-${{ matrix.os }}
|
container: emqx/build-env:${{ matrix.otp }}-${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- uses: AutoModality/action-clean@v1
|
||||||
|
# keep using v1 for now as the otp-23 image has an old version git
|
||||||
|
# TODO: change to v3 after OTP is upgraded to 23.3.4.18-1
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: fix-git-unsafe-repository
|
- name: fix-git-unsafe-repository
|
||||||
run: git config --global --add safe.directory /__w/emqx/emqx
|
run: git config --global --add safe.directory /__w/emqx/emqx
|
||||||
|
|
|
@ -150,6 +150,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
docker rm -f $(docker ps -qa) || true
|
docker rm -f $(docker ps -qa) || true
|
||||||
docker network rm $(docker network ls -q) || true
|
docker network rm $(docker network ls -q) || true
|
||||||
|
docker system prune --volumes -f
|
||||||
- name: docker compose up
|
- name: docker compose up
|
||||||
working-directory: source
|
working-directory: source
|
||||||
env:
|
env:
|
||||||
|
@ -221,6 +222,11 @@ jobs:
|
||||||
- name: set log file name
|
- name: set log file name
|
||||||
if: failure()
|
if: failure()
|
||||||
run: echo "LOGFILENAME=logs-$(echo ${{ matrix.app_name }} | tr '/' '_')" >> $GITHUB_ENV
|
run: echo "LOGFILENAME=logs-$(echo ${{ matrix.app_name }} | tr '/' '_')" >> $GITHUB_ENV
|
||||||
|
- name: stop containers
|
||||||
|
run: |
|
||||||
|
docker rm -f $(docker ps -qa) || true
|
||||||
|
docker network rm $(docker network ls -q) || true
|
||||||
|
docker system prune --volumes -f
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in New Issue