diff --git a/aks-deploy/action.yml b/aks-deploy/action.yml index 8ad3a33..461aade 100644 --- a/aks-deploy/action.yml +++ b/aks-deploy/action.yml @@ -1,5 +1,5 @@ name: Deploy helm chart -description: "Check the size of a Pull Request" +description: "Check the size of a Pull Request" inputs: branch: @@ -57,6 +57,11 @@ inputs: description: to set the timeout for the helm upgrade command type: string default: '5m0s' + uninstall: + description: 'true if you want to uninstall instead of install' + required: false + type: boolean + default: false runs: using: "composite" @@ -102,6 +107,7 @@ runs: - name: 🚀 Helm Deploy shell: bash + if: ${{ inputs.uninstall == 'false' }} working-directory: ${{ env.working_dir }} run: | echo "🚀 Launch helm deploy" @@ -114,3 +120,13 @@ runs: echo "✅ Helm deployed" + - name: 🗑Remove deployment + if: ${{ inputs.uninstall == 'true' }} + shell: bash + env: + APP_NAME: ${{ inputs.app_name }} + NAMESPACE: ${{ inputs.namespace }} + run: | + echo "🗑Launch helm uninstall" + helm uninstall "$APP_NAME" -n "$NAMESPACE" + echo "✔️Helm uninstall" \ No newline at end of file