-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
49 lines (47 loc) · 1.3 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
name: 'Generate UUID'
description: 'Generates a UUID using the uuid module in python'
branding:
icon: archive
color: red
inputs:
version:
description: 'Version of UUID to use'
required: true
default: 4
namespace:
description: "The UUID's namespace. Only applies to UUID versions 3 and 5."
required: false
name:
description: "Name to use to create a UUID. Only applies to UUID versions 3 and 5."
required: false
outputs:
uuid:
description: "The generated UUID"
value: ${{ steps.generate.outputs.uuid }}
safe:
description: "The safeness of the UUID"
value: ${{ steps.generate.outputs.safe }}
runs:
using: "composite"
steps:
- name: Push local vars to env
run: |
echo "INPUT_VERSION=${{ inputs.version }}" >> $GITHUB_ENV
echo "INPUT_NAMESPACE=${{ inputs.namespace }}" >> $GITHUB_ENV
echo "INPUT_NAME=${{ inputs.name }}" >> $GITHUB_ENV
shell: bash
- name: checkout this repo
uses: actions/checkout@v4.1.7
with:
repository: bossOfCode/generate-uuid
- name: Generate UUID
id: generate
run: |
pip install --upgrade pip
if [ ${{ inputs.version }} == 7 ]
then
python3 src/generate7.py
else
python3 src/generate.py
fi
shell: bash