-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
54 lines (54 loc) · 1.61 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
name: "Shortify Git Revision"
description: "Github Action to shortify a git revision"
author: "Romain Lespinasse"
branding:
icon: "crop"
color: "gray-dark"
inputs:
name:
description: "Environment variable that will hold the value and serve as prefix to shortify value"
required: true
revision:
description: "Revision to short"
required: false
continue-on-error:
description: "Don't fail the action if the git revision isn't valid"
default: "false"
required: false
short-on-error:
description: "Still short it if the git revision isn't valid"
default: "false"
required: false
prefix:
description: "Value to prepend to each generated variable"
default: ""
required: false
length:
description: "Value to configure the length of the shorted sha"
default: ""
required: false
publish-env:
description: "Publish short as environment variable"
default: "true"
required: false
outputs:
revision:
description: "The revision to be shortify"
value: ${{ steps.shortify.outputs.revision }}
short:
description: "Revision Short"
value: ${{ steps.shortify.outputs.short }}
runs:
using: "composite"
steps:
- id: shortify
run: $GITHUB_ACTION_PATH/shortify.sh
shell: bash
env:
INPUT_NAME: ${{ inputs.name }}
INPUT_REVISION: ${{ inputs.revision }}
INPUT_CONTINUE_ON_ERROR: ${{ inputs.continue-on-error }}
INPUT_SHORT_ON_ERROR: ${{ inputs.short-on-error }}
INPUT_PREFIX: ${{ inputs.prefix }}
INPUT_LENGTH: ${{ inputs.length }}
INPUT_PUBLISH_ENV: ${{ inputs.publish-env }}