File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ set -o errexit
8
8
set -o nounset
9
9
set -o pipefail
10
10
11
+ set -x
12
+
11
13
main () {
12
14
local version=${VERSION:- v1.2.1}
13
15
local charts_dir=${CHART_DIR:- charts}
@@ -52,13 +54,12 @@ release_charts_inside_folders() {
52
54
53
55
chart_name=$( read_chart_name " ${charts_dir} /${folder} " )
54
56
chart_version=$( read_chart_version " ${charts_dir} /${folder} " )
55
- echo " Checking if \" $charts_dir /$folder \" has been released to the repo"
56
57
chart_was_released=$( chart_released " ${chart_name} " " ${chart_version} " )
57
58
58
59
echo " released result: \" ${chart_was_released} \" "
59
60
60
61
# if chart is not released or folder has change, then remember as changed_charts
61
- if [ -z " ${chart_was_released} " ] || has_changed " $folder " ; then
62
+ if [ " ${chart_was_released} " == " Not found " ] || has_changed " $folder " ; then
62
63
changed_charts+=(" $folder " )
63
64
fi
64
65
done
Original file line number Diff line number Diff line change 8
8
- ' .github/**'
9
9
workflow_dispatch :
10
10
inputs :
11
+ backport-branch :
12
+ description : " Select backport branch if different from 'main'"
13
+ type : string
14
+ default : " main"
15
+ required : true
11
16
target :
12
17
description : " target chart to release"
13
18
type : string
22
27
jobs :
23
28
build :
24
29
runs-on : ubuntu-latest
30
+ env :
31
+ BACKPORT_BRANCH : ${{ github.event.inputs.backport-branch || 'main' }}
32
+ BACKPORT_DIR : ' backport'
25
33
steps :
26
34
- name : Checkout
27
35
uses : actions/checkout@v4
28
36
37
+ - name : Checkout Backport branch
38
+ uses : actions/checkout@v4
39
+ if : github.event.inputs.backport-branch != 'main'
40
+ with :
41
+ ref : ${{ env.BACKPORT_BRANCH }}
42
+ path : ${{ env.BACKPORT_DIR }}
43
+
29
44
- name : Configure Git
30
45
run : |
31
46
git config user.name "$GITHUB_ACTOR"
64
79
uses : ./.github/actions/releaser
65
80
env :
66
81
CR_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
82
+ CHARTS_DIR : ${{ github.event.inputs.backport-branch == 'main' && 'charts' || format('{0}/charts', env.BACKPORT_DIR) }}
67
83
with :
68
84
charts_repo_url : https://mongodb.github.io/helm-charts
69
85
target : ${{ github.event.inputs.target }}
70
86
dryrun : ${{ github.event.inputs.dryrun }}
87
+ charts_dir : ${{ env.CHARTS_DIR }}
You can’t perform that action at this time.
0 commit comments