-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
38 lines (31 loc) · 889 Bytes
/
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
name: 'Mark as deprecated'
description: 'Mark something as deprecated'
inputs:
name:
description: 'Name of the thing to mark as deprecated'
required: true
replacement:
description: 'The replacement'
required: false
reason:
description: 'The reason why it is deprecated'
required: false
runs:
using: composite
steps:
- name: 'Report deprecation'
shell: bash
env:
NAME: ${{ inputs.name }}
REPLACEMENT: ${{ inputs.replacement }}
REASON: ${{ inputs.reason }}
#language=bash
run: |
message="$NAME is deprecated and will be removed in the next major version."
if [ -n "$REPLACEMENT" ]; then
message="${message} Use $REPLACEMENT instead."
fi
if [ -n "$REASON" ]; then
message="${message} Reason: $REASON"
fi
echo "::warning::$message"