Skip to content

Destroy

Destroy #92

Workflow file for this run

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/action-download-artifact@v2.15.0
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