-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest-deprovision-environment.yml
More file actions
50 lines (45 loc) · 1.84 KB
/
test-deprovision-environment.yml
File metadata and controls
50 lines (45 loc) · 1.84 KB
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
49
50
name: Test Deprovision Environment
on:
workflow_dispatch:
inputs:
name:
description: 'The name of the ephemeral environment to deprovision.'
required: true
all_projects:
description: Deprovision for all projects
type: 'boolean'
default: false
project:
description: 'Project name. Required if deprovisioning a single project.'
server:
type: string
description: The url of the Octopus Instance. Will default to repository variable TEST_INSTANCE_URL if not supplied.
service_account_id:
type: string
description: The id of the service account to login for. Will default to repository variable TEST_INSTANCE_SERVICE_ACCOUNT_ID if not supplied.
space:
description: 'The name of the space containing the ephemeral environment. Will default to repository variable TEST_SPACE_NAME if not supplied.'
jobs:
deprovision-environment:
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
runs-on: ubuntu-latest
name: Test Ephemeral Environment Deprovisioning
steps:
- uses: actions/checkout@v3
- name: Login to Octopus Deploy
uses: OctopusDeploy/login@v1
with:
server: ${{ inputs.server || vars.TEST_INSTANCE_URL }}
service_account_id: ${{ inputs.service_account_id || vars.TEST_INSTANCE_SERVICE_ACCOUNT_ID }}
- name: Deprovision Ephemeral Environment
id: self_test
uses: ./
with:
name: ${{ inputs.name }}
all_projects: ${{ inputs.all_projects }}
project: ${{ inputs.project }}
space: ${{ inputs.space || vars.TEST_SPACE_NAME}}
- name: Show Test Action Output
run: echo "${{ steps.self_test.outputs.deprovisioning_runbook_runs }}"