-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
53 lines (53 loc) · 1.51 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
name: "Slugify Value"
description: "Github Action to slugify a value"
author: "Romain Lespinasse"
branding:
icon: "crop"
color: "gray-dark"
inputs:
key:
description: "Environment variable that will hold the value and serve as prefix to slugified value"
required: true
value:
description: "Value to slugify"
required: false
prefix:
description: "Value to prepend to each generated variable"
default: ""
required: false
slug-maxlength:
description: "Max length of the slugified values"
default: "63"
required: true
publish-env:
description: "Publish slugs as environment variables"
default: "true"
required: true
outputs:
value:
description: "The value to be slugify"
value: ${{ steps.slugify.outputs.value }}
slug:
description: "Value Slug"
value: ${{ steps.slugify.outputs.slug }}
slug-cs:
description: "Value Slug (Case-sensitive)"
value: ${{ steps.slugify.outputs.slug-cs }}
slug-url:
description: "Value Slug URL"
value: ${{ steps.slugify.outputs.slug-url }}
slug-url-cs:
description: "Value Slug URL (Case-sensitive)"
value: ${{ steps.slugify.outputs.slug-url-cs }}
runs:
using: "composite"
steps:
- id: slugify
run: $GITHUB_ACTION_PATH/slugify.sh
shell: bash
env:
INPUT_KEY: ${{ inputs.key }}
INPUT_VALUE: ${{ inputs.value }}
INPUT_PREFIX: ${{ inputs.prefix }}
INPUT_SLUG_MAXLENGTH: ${{ inputs.slug-maxlength }}
INPUT_PUBLISH_ENV: ${{ inputs.publish-env }}