File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change 1
1
name : Release Observability Artifacts
2
2
3
3
on :
4
+ push :
5
+ branches :
6
+ - ci-release
4
7
workflow_dispatch :
5
8
inputs :
6
9
version :
@@ -17,15 +20,21 @@ jobs:
17
20
steps :
18
21
- name : Checkout code
19
22
uses : actions/checkout@v4
20
-
21
- - name : Set release version
22
- id : version
23
+ - name : Extract version from commit message
24
+ id : extract
23
25
run : |
24
- if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
25
- echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
26
- else
27
- echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
28
- fi
26
+ COMMIT_MSG="${{ github.event.head_commit.message }}"
27
+ VERSION=$(echo "$COMMIT_MSG" | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+')
28
+ echo "VERSION=$VERSION" >> $GITHUB_ENV
29
+
30
+ # - name: Set release version
31
+ # id: version
32
+ # run: |
33
+ # if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
34
+ # echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
35
+ # else
36
+ # echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
37
+ # fi
29
38
30
39
- name : Package Grafana artifacts
31
40
run : |
You can’t perform that action at this time.
0 commit comments