diff --git a/.github/workflows/update-k3s-version.yml b/.github/workflows/update-k3s-version.yml index 479c8665..1d7043d9 100644 --- a/.github/workflows/update-k3s-version.yml +++ b/.github/workflows/update-k3s-version.yml @@ -20,8 +20,11 @@ jobs: - name: Update README.md run: | - K3S_VERSION="k3s-$KUBE_VERSION" - sed -i "s|k3s-v[0-9.]*+k3s[0-9]*|$K3S_VERSION|g" README.md + # Encode '+' as '%2B' for URL compatibility in the badge link + K3S_VERSION_ENCODED=$(echo "$KUBE_VERSION" | sed 's/\+/%2B/g') + K3S_VERSION="k3s-${K3S_VERSION_ENCODED}" + # Use the encoded version in the sed command to ensure proper matching and replacement + sed -i "s|k3s-v[0-9.]*%2Bk3s[0-9]*|$K3S_VERSION|g" README.md - name: Commit and Push run: | diff --git a/kubernetes/apps/kube-system/system-upgrade-controller/ks.yaml b/kubernetes/apps/kube-system/system-upgrade-controller/ks.yaml index 1f283ed6..78f0932a 100644 --- a/kubernetes/apps/kube-system/system-upgrade-controller/ks.yaml +++ b/kubernetes/apps/kube-system/system-upgrade-controller/ks.yaml @@ -45,3 +45,4 @@ spec: substitute: # renovate: datasource=github-releases depName=k3s-io/k3s KUBE_VERSION: v1.29.1+k3s2 + \ No newline at end of file