Delete Namespace and Databases manually #68
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Delete Namespace and Databases manually | |
on: | |
workflow_dispatch: | |
inputs: | |
namespace: | |
type: string | |
description: Kubernetes namespace to delete, has to start with e.g. spsh-1234 | |
required: true | |
jobs: | |
check_namespace_input: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if namespace is allowed, fails if it not starts with ticketnr, e.g. spsh-1234 | |
run: | | |
regex='^([[:alpha:]]+?-[[:digit:]]+)' | |
[[ ${{ github.event.inputs.namespace }} =~ $regex ]] | |
echo "${BASH_REMATCH[1]}" | |
delete_namespace: | |
needs: | |
- check_namespace_input | |
uses: dBildungsplattform/spsh-app-deploy/.github/workflows/delete-namespace.yml@DBP-453-Create-Redis-DBCluster-available-for-session-storage-of-SPSH | |
with: | |
namespace: ${{ github.event.inputs.namespace }} | |
secrets: | |
SPSH_DEV_KUBECONFIG: ${{ secrets.SPSH_DEV_KUBECONFIG }} | |
deletion_successful: | |
needs: | |
- delete_namespace | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "Deletion of namespace" ${{ github.event.inputs.namespace }} "done" |