@@ -5,6 +5,10 @@ branding:
5
5
icon : ' git-branch'
6
6
color : ' gray-dark'
7
7
inputs :
8
+ tool-version :
9
+ description : ' The version of the tool to be ran'
10
+ required : true
11
+ default : latest
8
12
release-branch :
9
13
description : ' The name of the release branch'
10
14
required : true
@@ -23,27 +27,39 @@ inputs:
23
27
outputs :
24
28
version :
25
29
description : ' The value of the new pre-calculated tag'
30
+ value : ${{ steps.version.outputs.version }}
26
31
previous-version :
27
32
description : ' Contains the value of previous tag, before calculating a new one'
33
+ value : ${{ steps.previous-version.outputs.version }}
28
34
runs :
29
- using : ' docker'
30
- image : ' Dockerfile'
31
- args :
32
- - /bin/bash
33
- - -c
34
- - |
35
- VERSION=$(/bin/git-version \
36
- --release-branch "${{ inputs.release-branch }}" \
37
- --dev-branch "${{ inputs.dev-branch }}" \
38
- --version-prefix "${{ inputs.prefix }}") && \
39
- echo "::set-output name=version::$VERSION" && \
35
+ using : " composite"
36
+ steps :
37
+ - id : previous-version
38
+ shell : bash
39
+ run : |
40
+ set -e
41
+
42
+ export PREVIOUS_VERSION=$(docker run -v $(pwd):/repo codacy/git-version:${{ inputs.tool-version }} \
43
+ /bin/git-version \
44
+ --previous-version \
45
+ --folder /repo \
46
+ --release-branch "${{ inputs.release-branch }}" \
47
+ --dev-branch "${{ inputs.dev-branch }}" \
48
+ --version-prefix "${{ inputs.prefix }}")
49
+
50
+ echo "::set-output name=previous-version::$PREVIOUS_VERSION"
51
+ echo "Previous Version: $PREVIOUS_VERSION"
52
+ - id : version
53
+ shell : bash
54
+ run : |
55
+ set -e
40
56
41
- PREVIOUS_VERSION =$(/bin /git-version \
42
- --previous -version \
43
- --release-branch "${{ inputs.release-branch }}" \
44
- --dev -branch "${{ inputs.dev -branch }}" \
45
- --version-prefix "${{ inputs.prefix }}") && \
46
- echo "::set-output name=previous- version::$PREVIOUS_VERSION" && \
57
+ export VERSION =$(docker run -v $(pwd):/repo codacy /git-version:${{ inputs.tool-version }} \
58
+ /bin/git -version \
59
+ --folder /repo \
60
+ --release -branch "${{ inputs.release -branch }}" \
61
+ --dev-branch "${{ inputs.dev-branch }}" \
62
+ -- version-prefix "${{ inputs.prefix }}")
47
63
48
- echo "Previous Version: $PREVIOUS_VERSION "
49
- echo "New Version: $VERSION"
64
+ echo "::set-output name=version::$VERSION "
65
+ echo "New Version: $VERSION"
0 commit comments