File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,40 @@ on: # yamllint disable-line rule:truthy
14
14
- major
15
15
- minor
16
16
- 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 (Use this only if n-1/n-2 patch is selected)"
20
+ required : false
21
+ type : string
17
22
jobs :
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
18
46
csm-release :
47
+ needs : [process-inputs]
19
48
uses : dell/common-github-actions/.github/workflows/csm-release-driver-module.yaml@main
20
49
name : Release CSM Drivers and Modules
21
50
with :
22
- version : ${{ github.event. inputs.option }}
51
+ version : " ${{ needs.process- inputs.outputs.processedVersion }}"
23
52
images : ' csi-unity'
24
53
secrets : inherit
You can’t perform that action at this time.
0 commit comments