-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (43 loc) · 1.46 KB
/
destroy.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
name: Destroy
on:
push:
branches:
- 'main'
paths:
- 'destroy.md'
workflow_dispatch:
jobs:
Setup:
name: Setup OpenShift Installer Binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download OCP Cluster Artifacts
uses: dawidd6/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: deploy.yaml
# workflow_conclusion: failure
branch: main
name: ocp-artifact
path: .
check_artifacts: false
- name: Install OpenShift CLI tools
uses: redhat-actions/openshift-tools-installer@v1
with:
openshift-install: "${{ secrets.OCP_CLIENT_VERSION }}"
- name: Destroy OpenShift Cluster
run: openshift-install destroy cluster --dir=.
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Create AWS S3 Bucket for AAP HA DB
run: |
aws s3 rb s3://${{secrets.OCP_CLUSTER_NAME}}-aap-ha-db-bucket --force