File tree 2 files changed +29
-4
lines changed
2 files changed +29
-4
lines changed Original file line number Diff line number Diff line change 26
26
version :
27
27
uses : ./.github/workflows/r_version.yml
28
28
29
+ commit_sha :
30
+ uses : ./.github/workflows/r_commit_sha.yml
31
+
29
32
build :
30
- needs : version
33
+ needs : [ version, commit_sha ]
31
34
strategy :
32
35
matrix :
33
36
distribution : [tar, rpm, deb]
@@ -37,10 +40,10 @@ jobs:
37
40
architecture : ${{ matrix.architecture }}
38
41
distribution : ${{ matrix.distribution }}
39
42
revision : ${{ inputs.revision }}
40
- name : wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ inputs.revision }}-${{ matrix.architecture }}_${{ github.sha }}.${{ matrix.distribution }}
43
+ name : wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ inputs.revision }}-${{ matrix.architecture }}_${{ needs.commit_sha.outputs.commit_sha }}.${{ matrix.distribution }}
41
44
42
45
assemble :
43
- needs : [version, build]
46
+ needs : [version, commit_sha, build]
44
47
strategy :
45
48
matrix :
46
49
distribution : [tar, rpm, deb]
54
57
with :
55
58
architecture : ${{ matrix.architecture }}
56
59
distribution : ${{ matrix.distribution }}
57
- min : wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ inputs.revision }}-${{ matrix.architecture }}_${{ github.sha }}.${{ matrix.distribution }}
60
+ min : wazuh-indexer-min_${{ needs.version.outputs.version }}-${{ inputs.revision }}-${{ matrix.architecture }}_${{ needs.commit_sha.outputs.commit_sha }}.${{ matrix.distribution }}
Original file line number Diff line number Diff line change
1
+ name : " Get commit's short SHA (reusable)"
2
+
3
+ # This workflow runs when any of the following occur:
4
+ # - Run from another workflow
5
+ on :
6
+ workflow_call :
7
+ outputs :
8
+ commit_sha :
9
+ description : " Returns the short SHA of the latest commit"
10
+ value : ${{ jobs.r_commit_sha.outputs.commit_sha }}
11
+
12
+ jobs :
13
+ r_commit_sha :
14
+ runs-on : ubuntu-latest
15
+ outputs :
16
+ commit_sha : ${{ steps.get_commit_sha.outputs.commit_sha }}
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ - name : Get git commit SHA
20
+ id : get_commit_sha
21
+ run : |
22
+ echo "commit_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments