diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d57340349..6aa7ad560 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -116,6 +116,10 @@ jobs: - name: Run e2e tests run: make e2e-test + - name: Cleanup image + if: ${{ always() }} + run: make image-cleanup + staticcheck: runs-on: ubuntu-20.04 diff --git a/Makefile b/Makefile index f0cea699b..1d48ea856 100644 --- a/Makefile +++ b/Makefile @@ -150,6 +150,12 @@ e2e-cleanup: # Clean up rm -rf ~/.vela +image-cleanup: +# Delete Docker image +ifneq ($(shell docker images -q vela-core-test:$(GIT_COMMIT)),) + docker image rm -f vela-core-test:$(GIT_COMMIT) +endif + # load docker image to the kind cluster kind-load: docker build -t vela-core-test:$(GIT_COMMIT) .