Skip to content

Commit 744ec22

Browse files
authored
[chore] Add workflow_dispatch to build making releases (#1402)
1 parent 47b5d0e commit 744ec22

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/release.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Release Charts
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
@@ -20,9 +21,9 @@ jobs:
2021
- name: Validate Chart.yaml Update
2122
id: check_update_chart
2223
run: |
23-
VERSION_DIFF=$(git diff HEAD^ -- "*Chart.yaml" | grep -E "^\+version:" || echo "")
24-
echo "VERSION_DIFF=$VERSION_DIFF" # example value: +version: 0.80.1
25-
if [[ ! -z "$VERSION_DIFF" ]]; then
24+
LATEST_VERSION=$(curl -s https://api.github.com/repos/signalfx/splunk-otel-collector-chart/releases/latest | grep tag_name | cut -d - -f 4 | cut -d \" -f 1)
25+
CURRENT_VERSION=$(cat helm-charts/splunk-otel-collector/Chart.yaml | grep -E "^version:" | cut -d " " -f 2)
26+
if [ "$LATEST_VERSION" != "$CURRENT_VERSION" ]; then
2627
echo "New release needed, creating..."
2728
echo "VALID_UPDATE=1" >> $GITHUB_OUTPUT
2829
else

0 commit comments

Comments
 (0)