From f5802bdf34500472509db6dd02ad896d20ad4008 Mon Sep 17 00:00:00 2001 From: daniellrr <155436706+daniellrr@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:12:25 +0100 Subject: [PATCH 1/3] Update docker_build_upgrade_k8s.yml --- .github/workflows/docker_build_upgrade_k8s.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_build_upgrade_k8s.yml b/.github/workflows/docker_build_upgrade_k8s.yml index 65f7a16..8ca120a 100644 --- a/.github/workflows/docker_build_upgrade_k8s.yml +++ b/.github/workflows/docker_build_upgrade_k8s.yml @@ -5,12 +5,12 @@ on: branches: - main paths: - - 'upgrade_edge/Dockerfile' + - 'upgrade_edge/**' pull_request: branches: - main paths: - - 'upgrade_edge/Dockerfile' + - 'upgrade_edge/**' workflow_dispatch: jobs: From 0dfa8fa9651bed5520959543d21643b420f508a1 Mon Sep 17 00:00:00 2001 From: daniellrr <155436706+daniellrr@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:38:21 +0100 Subject: [PATCH 2/3] update CMD command --- upgrade_edge/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade_edge/Dockerfile b/upgrade_edge/Dockerfile index 71c09de..3df3cbe 100644 --- a/upgrade_edge/Dockerfile +++ b/upgrade_edge/Dockerfile @@ -4,4 +4,4 @@ COPY upgrade_edge/upgrade_edge.sh /opt/upgrade_edge.sh RUN chmod +x /opt/upgrade_edge.sh -CMD ["/opt/upgrade_edge.sh"] \ No newline at end of file +CMD ["/bin/sh", "/opt/upgrade_edge.sh"] From c2034e80970cfd196026b8c5b6bf033048575dea Mon Sep 17 00:00:00 2001 From: daniellrr <155436706+daniellrr@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:44:08 +0100 Subject: [PATCH 3/3] Update upgrade_edge.sh --- upgrade_edge/upgrade_edge.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/upgrade_edge/upgrade_edge.sh b/upgrade_edge/upgrade_edge.sh index e215c0e..bc4fb68 100644 --- a/upgrade_edge/upgrade_edge.sh +++ b/upgrade_edge/upgrade_edge.sh @@ -7,8 +7,9 @@ #TALOS_VERSION="v1.5.5" #UPGRADE_KUBERENTES="true" -if [[ "$UPGRADE_KUBERNETES" == "true" ]] || [[ "$UPGRADE_TALOS" == "true" && -n $TALOS_VERSION ]]; then +if [[ "$UPGRADE_KUBERNETES" != "true" ]] || { [[ "$UPGRADE_TALOS" != "true" ]] && [[ -z "$TALOS_VERSION" ]]; }; then echo "None of the variables UPGRADE_KUBERNETES or UPGRADE_TALOS has been set to true (true as a string, not a boolean), exiting without any upgrading" + exit 0 fi check_talos_version_existence() { @@ -83,4 +84,4 @@ elif [ "$UPGRADE_KUBERENTES" = "true" ]; then check_talosctl_version get_current_k8s_version upgrade_kubernetes -fi \ No newline at end of file +fi