File tree Expand file tree Collapse file tree 1 file changed +31
-2
lines changed
Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,41 @@ on: # yamllint disable-line rule:truthy
1414 - major
1515 - minor
1616 - patch
17+ - " n-1/n-2 patch (Provide input in the below box)"
18+ version :
19+ description : " Patch version to release. example: 2.1.x (For n-1 and n-2 versions only)"
20+ required : false
21+ type : string
1722 repository_dispatch :
1823 types : [release-go-libs]
1924jobs :
25+ process-inputs :
26+ name : Process Inputs
27+ runs-on : ubuntu-latest
28+ outputs :
29+ processedVersion : ${{ steps.set-version.outputs.versionEnv }}
30+ steps :
31+ - name : Process input
32+ id : set-version
33+ shell : bash
34+ run : |
35+ if [[ "${{ github.event.inputs.version }}" != "" && "${{ github.event.inputs.option }}" == "n-1/n-2 patch (Provide input in the below box)" ]]; then
36+ # if both version and option are provided, then version takes precedence i.e. patch release for n-1/n-2
37+ echo "versionEnv=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
38+ exit 0
39+ fi
40+
41+ if [[ "${{ github.event.inputs.option }}" != "n-1/n-2 patch (Provide input in the below box)" ]]; then
42+ # if only option is provided, then option takes precedence i.e. minor, major or patch release
43+ echo "versionEnv=${{ github.event.inputs.option }}" >> $GITHUB_OUTPUT
44+ exit 0
45+ fi
46+ # if neither option nor version is provided, then minor release is taken by default (Auto-release)
47+ echo "versionEnv=minor" >> $GITHUB_OUTPUT
2048 csm-release :
21- uses : dell/common-github-actions/.github/workflows/csm-release-libs.yaml@main
49+ needs : [process-inputs]
50+ uses : harishp8889/test-common-github-actions/.github/workflows/csm-release-libs.yaml@main
2251 name : Release Go Client Libraries
2352 with :
24- version : " ${{ github.event. inputs.option || 'minor' }}"
53+ version : " ${{ needs.process- inputs.outputs.processedVersion }}"
2554 secrets : inherit
You can’t perform that action at this time.
0 commit comments