Skip to content

Commit 81c9754

Browse files
authored
Merge pull request #69 from consideRatio/pr/fix-workaround-again
Fix workaround added in 3.0.1 and adjusted in 3.0.2
2 parents 6b763d8 + a0e4b15 commit 81c9754

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ runs:
129129
- name: Setup k3s ${{ inputs.k3s-version }}${{ inputs.k3s-channel }}
130130
run: |
131131
echo "::group::Setup k3s ${{ inputs.k3s-version }}${{ inputs.k3s-channel }}"
132-
133132
if [[ "${{ inputs.metrics-enabled }}" != true ]]; then
134133
k3s_disable_metrics="--disable metrics-server"
135134
fi
@@ -155,7 +154,12 @@ runs:
155154
verlte() {
156155
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
157156
}
158-
v=${{ inputs.k3s-version }}${{ inputs.k3s-channel }}
157+
# If a k3s channel is specified we append a patch version of 99 to it
158+
# to ensure our verlte comparisons below functions as intended.
159+
#
160+
c=${{ inputs.k3s-channel }}
161+
c=${c:+$c.99}
162+
v=${{ inputs.k3s-version }}${c}
159163
if ([[ "$v" != v* ]]) || ([[ "$v" == v1.22.* ]] && verlte "v1.22.10" "$v") || ([[ "$v" == v1.23.* ]] && verlte "v1.23.7" "$v") || (verlte "v1.24.1" "$v"); then
160164
default_extra_setup_args=--egress-selector-mode=disabled
161165
fi

0 commit comments

Comments
 (0)