-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathaction.yml
68 lines (68 loc) · 2.14 KB
/
action.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: 'OpsLevel - Report Deploy'
author: 'OpsLevel <[email protected]>'
description: 'Create a deploy event for a service in OpsLevel'
branding:
icon: 'package'
color: 'blue'
inputs:
integration_url:
description: 'The OpsLevel deploy integration url'
required: true
deduplication_id:
description: 'An identifier that can be used to deduplicate deployments'
required: false
default: ${{ github.run_id }}
deployer_email:
description: 'The deployer email who created the event'
required: false
default: ''
deployer_name:
description: 'The deployer name who created the event'
required: false
default: ${{ github.actor }}
deploy_url:
description: 'The deploy url that OpsLevel points to'
required: false
default: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
description:
description: 'The description or release notes for the event'
required: false
default: 'Event Created by ${{ github.workflow }}'
environment:
description: 'The environment for the event'
required: false
default: production
number:
description: 'The deploy number for the event'
required: false
default: ${{ github.run_number }}
service:
description: 'The service alias for the event'
required: false
default: ${{ github.repository }}
runs:
using: "composite"
steps:
- name: Install OpsLevel CLI
uses: opslevel/actions/setup-cli@v1
- name: Mask inputs
shell: bash
run: |
set +v
echo ::add-mask::${{ inputs.integration_url }}
set -v
- name: Report Deploy to OpsLevel
shell: bash
run: |
cat <<EOF > data.yaml
service: "${{ inputs.service }}"
description: "${{ inputs.description }}"
environment: "${{ inputs.environment }}"
deploy-number: "${{ inputs.number }}"
deploy-url: "${{ inputs.deploy_url}}"
dedup-id: "${{ inputs.deduplication_id }}"
deployer:
name: "${{ inputs.deployer_name }}"
email: "${{ inputs.deployer_email }}"
EOF
opslevel create deploy -i "${{ inputs.integration_url }}" -f .