-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
52 lines (52 loc) · 2.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
name: 'Semantic Versioning Action'
description: 'A GitHub Action for using a JSON file as the persistence for your Semantic Version number for your repository'
inputs:
path:
description: 'The path to the semver JSON file'
required: false
default: 'semver.json'
major-version:
description: 'The major version number'
required: false
default: '0'
minor-version:
description: 'The minor version number'
required: false
default: '0'
patch-version:
description: 'The patch version number'
required: false
default: '0'
build-version:
description: 'The build version number'
required: false
default: '0'
outputs:
major:
description: 'The major version number'
minor:
description: 'The minor version number'
patch:
description: 'The patch version number'
build:
description: 'The build version number'
version:
description: 'The full version number'
runs:
using: 'docker'
image: 'docker://ghcr.io/afterlife-guide/semver.action:1.0.7.9'
args:
- ${{ (inputs.major-version == '0' && inputs.minor-version == '0' && inputs.patch-version == '0' && inputs.build-version == '0') && 'read' || 'write' }}
- '-p'
- '/github/workspace/${{ inputs.path }}'
- ${{ !(inputs.major-version == '0' && inputs.minor-version == '0' && inputs.patch-version == '0' && inputs.build-version == '0') && '-m' || '' }}
- ${{ !(inputs.major-version == '0' && inputs.minor-version == '0' && inputs.patch-version == '0' && inputs.build-version == '0') && inputs.major-version || '' }}
- ${{ !(inputs.major-version == '0' && inputs.minor-version == '0' && inputs.patch-version == '0' && inputs.build-version == '0') && '-n' || '' }}
- ${{ !(inputs.major-version == '0' && inputs.minor-version == '0' && inputs.patch-version == '0' && inputs.build-version == '0') && inputs.minor-version || '' }}
- ${{ !(inputs.major-version == '0' && inputs.minor-version == '0' && inputs.patch-version == '0' && inputs.build-version == '0') && '-h' || '' }}
- ${{ !(inputs.major-version == '0' && inputs.minor-version == '0' && inputs.patch-version == '0' && inputs.build-version == '0') && inputs.patch-version || '' }}
- ${{ !(inputs.major-version == '0' && inputs.minor-version == '0' && inputs.patch-version == '0' && inputs.build-version == '0') && '-b' || '' }}
- ${{ !(inputs.major-version == '0' && inputs.minor-version == '0' && inputs.patch-version == '0' && inputs.build-version == '0') && inputs.build-version || '' }}
branding:
icon: 'grid'
color: 'green'