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,11 +14,40 @@ 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
1722jobs :
23+ process-inputs :
24+ name : Process Inputs
25+ runs-on : ubuntu-latest
26+ outputs :
27+ processedVersion : ${{ steps.set-version.outputs.versionEnv }}
28+ steps :
29+ - name : Process input
30+ id : set-version
31+ shell : bash
32+ run : |
33+ if [[ "${{ github.event.inputs.version }}" != "" && "${{ github.event.inputs.option }}" == "n-1/n-2 patch (Provide input in the below box)" ]]; then
34+ # if both version and option are provided, then version takes precedence i.e. patch release for n-1/n-2
35+ echo "versionEnv=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
36+ exit 0
37+ fi
38+
39+ if [[ "${{ github.event.inputs.option }}" != "n-1/n-2 patch (Provide input in the below box)" ]]; then
40+ # if only option is provided, then option takes precedence i.e. minor, major or patch release
41+ echo "versionEnv=${{ github.event.inputs.option }}" >> $GITHUB_OUTPUT
42+ exit 0
43+ fi
44+ # if neither option nor version is provided, then minor release is taken by default (Auto-release)
45+ echo "versionEnv=minor" >> $GITHUB_OUTPUT
1846 csm-release :
19- uses : dell/common-github-actions/.github/workflows/csm-release-driver-module.yaml@main
47+ needs : [process-inputs]
48+ uses : harishp8889/test-common-github-actions/.github/workflows/csm-release-driver-module.yaml@main
2049 name : Release CSM Drivers and Modules
2150 with :
22- version : ${{ github.event. inputs.option }}
51+ version : " ${{ needs.process- inputs.outputs.processedVersion }}"
2352 images : ' csi-powerstore'
2453 secrets : inherit
You can’t perform that action at this time.
0 commit comments