Skip to content

Commit 47f1b3b

Browse files
ElysaSrcflomonster
authored andcommitted
ci: fix chart publish on release
Signed-off-by: ElysaSrc <[email protected]>
1 parent 8fde8ab commit 47f1b3b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/chart-publish.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ name: Publish Helm Chart to GHCR
22

33
on:
44
release:
5-
types:
6-
- created
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
tag_name:
9+
required: true
710

811
jobs:
912
release:
@@ -18,7 +21,11 @@ jobs:
1821
- name: Set Name and Version
1922
run: |
2023
CHART_NAME="osrd"
21-
CHART_VERSION="${{ github.event.release.tag_name }}"
24+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
25+
CHART_VERSION="${{ github.event.inputs.tag_name }}"
26+
else
27+
CHART_VERSION="${{ github.event.release.tag_name }}"
28+
fi
2229
echo "CHART_NAME=$CHART_NAME" >> $GITHUB_ENV
2330
echo "CHART_VERSION=$CHART_VERSION" >> $GITHUB_ENV
2431
sed -i "s/NAME_REPLACE_ME/$CHART_NAME/" ./chart/Chart.yaml

0 commit comments

Comments
 (0)