File tree 3 files changed +22
-17
lines changed
3 files changed +22
-17
lines changed Original file line number Diff line number Diff line change @@ -3,17 +3,17 @@ name: Build packages
3
3
# This workflow runs when any of the following occur:
4
4
# - Run manually
5
5
on :
6
- pull_request :
6
+ push :
7
7
# Sequence of patterns matched against refs/heads
8
8
branches :
9
9
- ' ci/*'
10
10
workflow_dispatch :
11
11
inputs :
12
12
revision :
13
- # description:
14
- default : " 1"
15
- required : false
13
+ description : " Any string or number used to extend the package's identifier"
16
14
type : string
15
+ required : true
16
+ default : " 1"
17
17
18
18
# ==========================
19
19
# Bibliography
25
25
# | https://docs.github.com/en/actions/using-workflows/reusing-workflows#using-a-matrix-strategy-with-a-reusable-workflow
26
26
# * Reading input from the called workflow
27
27
# | https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_callinputs
28
+ # * Ternary operator
29
+ # | https://docs.github.com/en/actions/learn-github-actions/expressions#example
28
30
29
31
jobs :
30
32
version :
43
45
with :
44
46
architecture : ${{ matrix.architecture }}
45
47
distribution : ${{ matrix.distribution }}
46
- revision : ${{ inputs.revision }}
47
- name : wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ inputs.revision }}-${{ matrix.architecture }}_${{ needs.commit_sha.outputs.commit_sha }}.${{ matrix.distribution }}
48
+ revision : ${{ github.event_name == 'push' && '1' || inputs.revision }}
49
+ name : wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ github.event_name == 'push' && '1' || inputs.revision }}-${{ matrix.architecture }}_${{ needs.commit_sha.outputs.commit_sha }}.${{ matrix.distribution }}
48
50
49
51
assemble :
50
52
needs : [version, commit_sha, build]
61
63
with :
62
64
architecture : ${{ matrix.architecture }}
63
65
distribution : ${{ matrix.distribution }}
64
- min : wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ inputs.revision }}-${{ matrix.architecture }}_${{ needs.commit_sha.outputs.commit_sha }}.${{ matrix.distribution }}
66
+ min : wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ github.event_name == 'push' && '1' || inputs.revision }}-${{ matrix.architecture }}_${{ needs.commit_sha.outputs.commit_sha }}.${{ matrix.distribution }}
Original file line number Diff line number Diff line change 6
6
workflow_call :
7
7
inputs :
8
8
distribution :
9
- description : ' One of [ " tar", " rpm", " deb" ] '
9
+ description : " One of [ ' tar', ' rpm', ' deb' ] "
10
10
default : " rpm"
11
- required : false
11
+ required : true
12
12
type : string
13
13
architecture :
14
- description : ' One of [ " x64", " arm64" ] '
14
+ description : " One of [ ' x64', ' arm64' ] "
15
15
default : " x64"
16
- required : false
16
+ required : true
17
17
type : string
18
18
min :
19
- description : The name of the package to download.
19
+ description : " The name of the package to download."
20
20
required : true
21
21
type : string
22
22
Original file line number Diff line number Diff line change 6
6
workflow_call :
7
7
inputs :
8
8
distribution :
9
- description : ' One of [ " tar", " rpm", " deb" ] '
9
+ description : " One of [ ' tar', ' rpm', ' deb' ] "
10
10
default : " rpm"
11
- required : false
11
+ required : true
12
12
type : string
13
13
architecture :
14
- description : ' One of [ " x64", " arm64" ] '
14
+ description : " One of [ ' x64', ' arm64' ] "
15
15
default : " x64"
16
- required : false
16
+ required : true
17
17
type : string
18
18
revision :
19
+ description : " Any string or number used to extend the package's identifier."
19
20
type : string
21
+ required : true
22
+ default : " 1"
20
23
name :
21
- description : The name of the package to upload.
24
+ description : " The name of the package to upload."
22
25
required : true
23
26
type : string
24
27
You can’t perform that action at this time.
0 commit comments