Skip to content

Commit 50daae3

Browse files
authored
Publish Chart Workflow needs to consider tags on all branches (#943)
Signed-off-by: Alan Sergeant <alan.sergeant@sap.com>
1 parent 4f82e27 commit 50daae3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/publish-chart.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ on:
88
branches:
99
- main
1010
tags:
11-
- 'v*.*.*'
11+
- "v*.*.*"
1212
paths-ignore:
13-
- 'docs/**'
14-
- '**/*.md'
13+
- "docs/**"
14+
- "**/*.md"
1515
pull_request:
1616
branches:
1717
- main
1818
paths-ignore:
19-
- 'docs/**'
20-
- '**/*.md'
19+
- "docs/**"
20+
- "**/*.md"
2121
types: [labeled, opened, synchronize, reopened]
2222

2323
jobs:
@@ -51,7 +51,7 @@ jobs:
5151
CHART_VERSION="${GITHUB_REF#refs/tags/v}"
5252
else
5353
# Get the latest tag
54-
LATEST_TAG=$(git describe --tags --abbrev=0 --match 'v[0-9]*.[0-9]*.[0-9]*' 2>/dev/null || echo "v0.0.0")
54+
LATEST_TAG=$(git tag -l 'v[0-9]*.[0-9]*.[0-9]*' --sort=-version:refname | head -1 || echo "v0.0.0")
5555
# Strip 'v' prefix
5656
VERSION="${LATEST_TAG#v}"
5757
# Remove prerelease/build metadata (everything after '-' or '+')

0 commit comments

Comments
 (0)