@@ -2,74 +2,127 @@ name: 🚀 Build
2
2
3
3
on :
4
4
# Manual trigger build
5
+ # No multi-select
6
+ # https://github.com/actions/runner/issues/2076
5
7
workflow_dispatch :
6
8
inputs :
7
- target :
8
- description : Build target
9
+ build_docker :
10
+ description : Build Docker
11
+ type : boolean
12
+ required : false
13
+
14
+ build_windows_x64 :
15
+ description : Build Windows x64
16
+ type : boolean
17
+ required : false
18
+
19
+ build_macos_x64 :
20
+ description : Build macOS x64
21
+ type : boolean
22
+ required : false
23
+
24
+ build_macos_arm64 :
25
+ description : Build macOS arm64
26
+ type : boolean
27
+ required : false
28
+
29
+ build_linux_appimage_x64 :
30
+ description : Build Linux AppImage x64
31
+ type : boolean
32
+ required : false
33
+
34
+ build_linux_deb_x64 :
35
+ description : Build Linux DEB x64
36
+ type : boolean
37
+ required : false
38
+
39
+ build_linux_rpm_x64 :
40
+ description : Build Linux RPM x64
41
+ type : boolean
42
+ required : false
43
+
44
+ build_linux_snap_x64 :
45
+ description : Build Linux Snap x64
46
+ type : boolean
9
47
required : false
10
- default : ' all'
11
- type : choice
12
- options :
13
- - all
14
- - docker
15
- - windows:x64
16
- - macos:x64
17
- - macos:arm64
18
- - macos:all
19
- - linux:appimage:x64
20
- - linux:deb:x64
21
- - linux:rpm:x64
22
- - linux:snap:x64
23
- - linux:all
24
48
25
49
environment :
26
50
description : Environment to run build
27
51
type : environment
28
52
default : ' staging'
29
53
required : false
30
54
55
+ debug :
56
+ description : Enable SSH Debug
57
+ type : boolean
58
+
31
59
# Called for Release workflows
32
60
workflow_call :
33
61
inputs :
34
62
environment :
35
63
description : Environment to run build
36
64
type : string
37
65
default : ' staging'
38
- required : false
66
+
39
67
target :
40
68
description : Build target
41
69
type : string
42
70
default : ' all'
43
- required : false
71
+
72
+ # Cancel a previous same workflow
73
+ concurrency :
74
+ group : ${{ github.workflow }}-${{ github.ref }}
75
+ cancel-in-progress : true
44
76
45
77
jobs :
78
+ get-selected :
79
+ runs-on : ubuntu-latest
80
+ outputs : # Set this to consume the output on other job
81
+ selected : ${{ steps.get-selected.outputs.selected}}
82
+ steps :
83
+ - uses : actions/checkout@v4
84
+
85
+ - id : get-selected
86
+ uses :
joao-zanutto/[email protected]
87
+ with :
88
+ format : ' list'
89
+
90
+ - run : echo ${{ steps.get-selected.outputs.selected }}
91
+
46
92
build-linux :
47
- if : startsWith(inputs.target, 'linux') || endsWith(inputs.target, 'all')
48
- # concurrency: build
93
+ needs : get-selected
94
+ if : contains(needs.get-selected.outputs.selected, 'linux') || inputs.target == 'all'
49
95
uses : ./.github/workflows/pipeline-build-linux.yml
50
96
secrets : inherit
51
97
with :
52
98
environment : ${{ inputs.environment }}
53
- target : ${{ (endsWith(inputs.target, 'all') && 'all') || inputs.target }}
99
+ target : ${{ inputs.target || needs.get-selected.outputs.selected }}
100
+ debug : ${{ inputs.debug }}
54
101
55
102
build-macos :
56
- if : startsWith(inputs.target, 'macos') || endsWith(inputs.target, 'all')
103
+ needs : get-selected
104
+ if : contains(needs.get-selected.outputs.selected, 'macos') || inputs.target == 'all'
57
105
uses : ./.github/workflows/pipeline-build-macos.yml
58
106
secrets : inherit
59
107
with :
60
108
environment : ${{ inputs.environment }}
61
- target : ${{ (endsWith(inputs.target, 'all') && 'all') || inputs.target }}
109
+ target : ${{ inputs.target || needs.get-selected.outputs.selected }}
110
+ debug : ${{ inputs.debug }}
62
111
63
112
build-windows :
64
- if : startsWith(inputs.target, 'windows') || endsWith(inputs.target, 'all')
113
+ needs : get-selected
114
+ if : contains(needs.get-selected.outputs.selected, 'windows') || inputs.target == 'all'
65
115
uses : ./.github/workflows/pipeline-build-windows.yml
66
116
secrets : inherit
67
117
with :
68
118
environment : ${{ inputs.environment }}
119
+ debug : ${{ inputs.debug }}
69
120
70
121
build-docker :
71
- if : startsWith(inputs.target, 'docker') || endsWith(inputs.target, 'all')
122
+ needs : get-selected
123
+ if : contains(needs.get-selected.outputs.selected, 'docker') || inputs.target == 'all'
72
124
uses : ./.github/workflows/pipeline-build-docker.yml
73
125
secrets : inherit
74
126
with :
75
127
environment : ${{ inputs.environment }}
128
+ debug : ${{ inputs.debug }}
0 commit comments