Skip to content

Delete Namespace and Databases manually #93

Delete Namespace and Databases manually

Delete Namespace and Databases manually #93

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

View workflow run for this annotation

GitHub Actions / Delete Namespace and Databases manually

Invalid workflow file

The workflow is not valid. .github/workflows/delete-namespace-manual.yml (Line: 32, Col: 9): Job 'deletion_successful' depends on unknown job 'delete_namespace'.
runs-on: ubuntu-latest
steps:
- run: echo "Deletion of namespace" ${{ github.event.inputs.namespace }} "done"