Delete Namespace and Databases manually #93
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 does not starts with ticketnr, e.g. spsh-1234 | ||
run: | | ||
regex='^([[:alpha:]]+?-[[:digit:]]+)' | ||
[[ ${{ github.event.inputs.namespace }} =~ $regex ]] | ||
echo "${BASH_REMATCH[1]}" | ||
delete_databases_and_namespace: | ||
needs: | ||
- check_namespace_input | ||
uses: dBildungsplattform/spsh-app-deploy/.github/workflows/delete-namespace.yml@5 | ||
with: | ||
namespace: ${{ github.event.inputs.namespace }} | ||
secrets: | ||
SPSH_DEV_KUBECONFIG: ${{ secrets.SPSH_DEV_KUBECONFIG }} | ||
deletion_successful: | ||
needs: | ||
- delete_namespace | ||
Check failure on line 32 in .github/workflows/delete-namespace-manual.yml GitHub Actions / Delete Namespace and Databases manuallyInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "Deletion of namespace" ${{ github.event.inputs.namespace }} "done" |