Skip to content

Commit 074f93a

Browse files
cicd: Added ref-name to build #TASK-8055
1 parent 506086f commit 074f93a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/build-java-app-workflow.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ on:
3131
type: string
3232
required: false
3333
default: "develop"
34+
ref-name:
35+
type: string
36+
required: false
37+
default: ""
3438
outputs:
3539
version:
3640
description: "Project version"
@@ -39,6 +43,7 @@ on:
3943
description: "Cache key used for Maven repository"
4044
value: ${{ jobs.build-workflow.outputs.cache_key }}
4145

46+
4247
jobs:
4348
build-workflow:
4449
name: Build Java app
@@ -53,6 +58,7 @@ jobs:
5358
## This checkout pulls the code of the repository where this workflow is being used
5459
with:
5560
fetch-depth: '10'
61+
ref: ${{ inputs.ref-name != '' && inputs.ref-name || github.ref_name }}
5662
- uses: actions/checkout@v4
5763
if: ${{ inputs.dependency_repos != '' }}
5864
name: Checkout java-common-libs repository

0 commit comments

Comments
 (0)