-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (32 loc) · 1.09 KB
/
delete-uat-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Delete UAT release
on:
pull_request:
types:
- closed
jobs:
delete_uat_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Delete UAT release
id: delete_uat
uses: ministryofjustice/[email protected]
with:
k8s_cluster: ${{ secrets.K8S_GHA_UAT_CLUSTER_NAME }}
k8s_cluster_cert: ${{ secrets.K8S_GHA_UAT_CLUSTER_CERT }}
k8s_namespace: ${{ secrets.K8S_GHA_UAT_NAMESPACE }}
k8s_token: ${{ secrets.K8S_GHA_UAT_TOKEN }}
# Deletes an RDS instance database with a name
# matching the branch/release. Note that it will
# use a previous steps kubernetes authentication,
# context and namespace.
- name: Delete UAT RDS database
shell: bash
id: delete_uat_db
run: |
bin/uat_drop_db ${{ steps.delete_uat.outputs.release-name }}
- name: Result
shell: bash
run: |
echo ${{ steps.delete_uat.outputs.delete-message }}
echo ${{ steps.delete_uat_db.outputs.drop-commmand-result }}