From 81024bbd5dd1c3c1725083551b32bb71df5789cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 27 May 2020 22:20:08 +0200 Subject: [PATCH] Adding cleanup action on delete --- .github/workflows/cleanup.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/cleanup.yml diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml new file mode 100644 index 00000000..919d685a --- /dev/null +++ b/.github/workflows/cleanup.yml @@ -0,0 +1,24 @@ +name: Cleanup images and environments + +on: + - delete + +# Enables BuildKit +env: + DOCKER_BUILDKIT: 1 + +jobs: + + delete_namespace: + runs-on: ubuntu-latest + + steps: + # Create a slugified value of the branch + - uses: rlespinasse/github-slug-action@1.1.0 + + - name: Cleanup + uses: thecodingmachine/deeployer-cleanup-action@master + env: + KUBE_CONFIG_FILE: ${{ secrets.KUBE_CONFIG_FILE }} + with: + namespace: workadventure-${{ env.GITHUB_REF_SLUG }}