Skip to content

Commit c022843

Browse files
author
Daniel Reigada
authored
Merge pull request #36 from codacy/feat/creat-github-action
Feat/creat GitHub action
2 parents 25bdc52 + 2e0707d commit c022843

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

action.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: codacy-git-version
2+
description: 'Outputs the version from git-version'
3+
inputs:
4+
release-branch:
5+
description: 'The name of the release branch'
6+
required: true
7+
default: master
8+
dev-branch:
9+
description: 'The name of the dev branch'
10+
required: true
11+
default: dev
12+
prefix:
13+
description: 'The prefix to use in the version'
14+
required: false
15+
# log-paths:
16+
# description: 'The paths to be used to calculate changes (comma-separated)'
17+
# required: false
18+
# default: ./
19+
outputs:
20+
version:
21+
description: 'The version'
22+
runs:
23+
using: 'docker'
24+
image: 'Dockerfile'
25+
args:
26+
- /bin/bash
27+
- -c
28+
- |
29+
VERSION=$(/bin/git-version \
30+
--release-branch "${{ inputs.release-branch }}" \
31+
--dev-branch "${{ inputs.dev-branch }}" \
32+
--version-prefix "${{ inputs.prefix }}") && \
33+
echo "::set-output name=version::$VERSION" && \
34+
echo "Version: $VERSION"

0 commit comments

Comments
 (0)