File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,10 +38,20 @@ jobs:
3838 source ./script/lib/libcitools.sh
3939 installHelm ${HELM_VERSION_STABLE:-v4.0.0} helm-stable
4040
41+ - name : Configure git identity (bot)
42+ run : |
43+ set -eu
44+ git config user.name "github-actions[bot]"
45+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
46+
4147 - name : Publish dev helm index via script
48+ env :
49+ GH_TOKEN : ${{ github.token }}
50+ INPUT_VERSION : ${{ inputs.version }}
51+ FULL_REGEN : ${{ inputs.full_regeneration }}
4252 run : |
4353 set -eu
44- ./ script/helm_index_publish.sh --mode dev
54+ bash script/helm_index_publish.sh --mode dev
4555
4656 - name : Show Helm repo add instructions (dev)
4757 run : |
Original file line number Diff line number Diff line change @@ -38,10 +38,20 @@ jobs:
3838 source ./script/lib/libcitools.sh
3939 installHelm ${HELM_VERSION_STABLE:-v4.0.0} helm-stable
4040
41+ - name : Configure git identity (bot)
42+ run : |
43+ set -eu
44+ git config user.name "github-actions[bot]"
45+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
46+
4147 - name : Publish stable helm index via script
48+ env :
49+ GH_TOKEN : ${{ github.token }}
50+ INPUT_VERSION : ${{ inputs.version }}
51+ FULL_REGEN : ${{ inputs.full_regeneration }}
4252 run : |
4353 set -eu
44- ./ script/helm_index_publish.sh --mode stable
54+ bash script/helm_index_publish.sh --mode stable
4555
4656 - name : Show Helm repo add instructions
4757 run : |
Original file line number Diff line number Diff line change 1+
Original file line number Diff line number Diff line change @@ -20,8 +20,12 @@ for arg in "$@"; do
2020 --mode=stable)
2121 MODE=" stable" ;;
2222 --mode)
23- shift ; MODE=" $1 " ;;
23+ shift ; MODE=" ${1:- $MODE } " ;;
24+ dev|stable)
25+ # Allow positional mode argument without flag
26+ MODE=" $arg " ;;
2427 * )
28+ # Ignore unknown arguments rather than failing
2529 echo " Unknown argument: $arg " >&2 ;;
2630 esac
2731done
@@ -122,6 +126,11 @@ return_branch_and_commit() {
122126 local message=" Helm(${MODE} ): refresh index.yaml (asset URLs) and metadata only"
123127 echo " Switching back to: $ORIG_BRANCH "
124128 git checkout --quiet " $ORIG_BRANCH "
129+ # Configure git identity for CI if missing
130+ if ! git config user.email > /dev/null; then
131+ git config user.name " ${GITHUB_ACTOR:- github-actions} "
132+ git config user.email " ${GITHUB_ACTOR:- github-actions} @users.noreply.github.com"
133+ fi
125134 if [[ -n $( git status --porcelain " $commit_path " ) ]]; then
126135 git add " $commit_path "
127136 git commit -m " $message "
@@ -140,7 +149,8 @@ main() {
140149 local tags_json
141150 tags_json=$( discover_tags)
142151 echo " Tags: $tags_json "
143- if [[ -z " $tags_json " || " $tags_json " == " null" ]]; then
152+ # Treat empty array or null as no work
153+ if [[ -z " $tags_json " || " $tags_json " == " null" || " $tags_json " == " []" ]]; then
144154 echo " No tags found"
145155 exit 0
146156 fi
You can’t perform that action at this time.
0 commit comments