generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.27 KB
/
prune-env.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
37
38
39
40
41
42
name: Destroy Stack
on:
workflow_dispatch:
inputs:
environment_name:
description: 'The name of the environment to destroy resources from dev or test or prod(BE CAREFUL HERE)'
required: true
default: 'dev'
type: choice
options:
- dev
- test
app_env:
required: true
type: choice
description: 'The APP env separates between AWS ENV and Actual APP, since AWS dev is where PR, and TEST is deployed'
options:
- dev
- test
permissions:
id-token: write # This is required for requesting the JWT
contents: write # This is required for actions/checkout
packages: write
jobs:
destroy-dev:
name: Destroy Stack Dev
if: ${{ github.event.inputs.app_env == 'dev' }}
uses: ./.github/workflows/.deploy_stack.yml
secrets: inherit
with:
environment_name: ${{ github.event.inputs.environment_name }}
command: destroy
app_env: ${{ github.event.inputs.app_env }}
destroy-test:
name: Destroy Stack Test
if: ${{ github.event.inputs.app_env == 'test' }}
uses: ./.github/workflows/.deploy_stack.yml
secrets: inherit
with:
environment_name: ${{ github.event.inputs.environment_name }}
command: destroy
app_env: ${{ github.event.inputs.app_env }}